2015-11-01 17:10:52 +01:00
|
|
|
from __future__ import absolute_import
|
2016-05-25 15:02:02 +02:00
|
|
|
|
|
|
|
from django.utils.translation import ugettext as _
|
2016-06-05 04:10:13 +02:00
|
|
|
from django.http import HttpResponse, HttpRequest
|
2013-10-17 22:55:09 +02:00
|
|
|
|
2016-06-05 04:10:13 +02:00
|
|
|
from zilencer.models import Deployment
|
|
|
|
|
2014-02-14 16:50:42 +01:00
|
|
|
from zerver.decorator import has_request_variables, REQ
|
2017-01-24 07:37:46 +01:00
|
|
|
from zerver.lib.error_notify import do_report_error
|
2014-02-14 16:50:42 +01:00
|
|
|
from zerver.lib.validator import check_dict
|
2016-06-24 02:26:09 +02:00
|
|
|
|
2017-03-06 08:35:57 +01:00
|
|
|
from typing import Any, Dict, Text
|
2013-10-17 22:55:09 +02:00
|
|
|
|
2013-11-13 19:12:22 +01:00
|
|
|
@has_request_variables
|
2016-05-31 16:29:39 +02:00
|
|
|
def report_error(request, deployment, type=REQ(), report=REQ(validator=check_dict([]))):
|
2016-12-08 05:06:51 +01:00
|
|
|
# type: (HttpRequest, Deployment, Text, Dict[str, Any]) -> HttpResponse
|
2016-08-11 21:44:09 +02:00
|
|
|
return do_report_error(deployment.name, type, report)
|