mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-19 04:47:54 +00:00
Do not send garbage to console in case of sentry not available
This commit is contained in:
parent
16dc0d1a8a
commit
10296f4f19
@ -43,14 +43,17 @@ class CrashReport:
|
||||
server_config = Config.instance().get_section_config("Server")
|
||||
if server_config.getboolean("report_errors"):
|
||||
if self._client is None:
|
||||
self._client = raven.Client(CrashReport.DSN, release=__version__)
|
||||
self._client = raven.Client(CrashReport.DSN, release=__version__, raise_send_errors=True)
|
||||
if request is not None:
|
||||
self._client.http_context({
|
||||
"method": request.method,
|
||||
"url": request.path,
|
||||
"data": request.json,
|
||||
})
|
||||
self._client.captureException()
|
||||
try:
|
||||
self._client.captureException()
|
||||
except Exception as e:
|
||||
log.error("Can't send crash report to Sentry: %s", e)
|
||||
|
||||
@classmethod
|
||||
def instance(cls):
|
||||
|
Loading…
Reference in New Issue
Block a user