Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support got_request_exception signal and rely on it rather than on process_exception code #658

Open
sshishov opened this issue Oct 6, 2024 · 1 comment

Comments

@sshishov
Copy link

sshishov commented Oct 6, 2024

Hi dear maintainer

We are using drf_standardized_errors and this package is handling unhandled exception without propagating them: ghazi-git/drf-standardized-errors#91

I would like to ask if it is possible to add the support for such scenario?

There can be 2 scenarios:

  • unhandled exceptions are propagated using standard django way and calling process_exception on middlewares (got_request_exception is emitted in this scenario as well)
  • unhandled exception is "handled" by some package and wrapped to return 500 and the signal got_request_exception is emitted.

Could we support both these scenarios as relying on signal which is used by Sentry as well is much more reliable than on middleware code which can be not called if exception is handled manually.

Best regards,
Sergei

@jrobichaud
Copy link
Owner

Did you try to change the order of the middlewares in your settings.py?

In which order are you using them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants