def consume(self, event): # type: (Mapping[str, Any]) -> None if settings.DEPLOYMENT_ROLE_KEY: self.staging_client.forward_error(event['type'], event['report']) elif settings.ZILENCER_ENABLED: from zilencer.views import do_report_error do_report_error(settings.DEPLOYMENT_ROLE_NAME, event['type'], event['report'])
def report_error(request, deployment, type=REQ(), report=REQ(validator=check_dict([]))): # type: (HttpRequest, Deployment, text_type, Dict[str, Any]) -> HttpResponse return do_report_error(deployment.name, type, report)