fix(wsgi): Log SystemExit (with non-zero exit code) and KeyboardInter… · bluetech/sentry-python@ddab2d4 · GitHub
Skip to content

Commit ddab2d4

Browse files
saifelseuntitaker
authored andcommitted
fix(wsgi): Log SystemExit (with non-zero exit code) and KeyboardInterrupt (getsentry#380)
* Log SystemExit (with non-zero exit code) and KeyboardInterrupt in WSGI middleware Neither SystemExit nor KeyboardInterrupt subclass Exception, so we must explicitly handle these two exception classes in addition to Exception in the WSGI middleware. This is notably a direct port from raven-python: - https://github.com/getsentry/raven-python/blob/master/raven/middleware.py - https://github.com/getsentry/raven-python/blob/master/tests/middleware/tests.py Fixes: getsentryGH-379
1 parent 3fc2a2f commit ddab2d4

2 files changed

Lines changed: 94 additions & 10 deletions

File tree

sentry_sdk/integrations/wsgi.py

Lines changed: 17 additions & 10 deletions

tests/integrations/wsgi/test_wsgi.py

Lines changed: 77 additions & 0 deletions

0 commit comments

Comments
 (0)