def log_exception(self, *args, **kwargs): """ Only attempt to report to Sentry when the client is setup. Discard when API key is not set or raven is not installed. """ if 'sentry_client' in self.settings: return SentryMixin.log_exception(self, *args, **kwargs) return RequestHandler.log_exception(self, *args, **kwargs)
def log_exception(self, typ, value, tb): if isinstance(value, PermissionError): app_log.warning('custom logging for PermissionError: %s', value.args[0]) else: RequestHandler.log_exception(self, typ, value, tb)
def log_exception(self, typ, value, tb): if isinstance(value, HTTPError) and value.status_code in [403, 404]: _RequestHandler.log_exception(self, typ, value, tb) else: _SentryMixin.log_exception(self, typ, value, tb)
def log_exception(self, typ, value, tb): if isinstance(value, (ServiceException, ServiceValidationFailsException)): return RequestHandler.log_exception(self, typ, value, tb)