mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-05 06:41:13 +02:00
Catch exceptions in various locations to fix small issues reported by Sentry.
This commit is contained in:
1 parent
341e2e2e3a
commit
4021a13651
8 files changed
+63
-40
No files matched your search
@@ -225,6 +225,11 @@ class Route(object):
|
||||
response = Response(request=request, route=route)
|
||||
response.set_status(408)
|
||||
response.json({"message": "Client error", "status": 408})
|
||||
except MemoryError:
|
||||
log.error("Memory error detected, server has run out of memory!", exc_info=1)
|
||||
response = Response(request=request, route=route)
|
||||
response.set_status(500)
|
||||
response.json({"message": "Memory error", "status": 500})
|
||||
except Exception as e:
|
||||
log.error("Uncaught exception detected: {type}".format(type=type(e)), exc_info=1)
|
||||
response = Response(request=request, route=route)
|
||||
|
||||
Reference in new issue
Block a user