-
-
Notifications
You must be signed in to change notification settings - Fork 304
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
[16.0] [IMP] fastapi: Factorize error handling and use it in tests with raise_server_exceptions=False #464
[16.0] [IMP] fastapi: Factorize error handling and use it in tests with raise_server_exceptions=False #464
Conversation
Hi @lmignon, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @paradoxxxzero for this useful change. A little comment to reduce the diff and it'll be perfect.
…e_server_exceptions=False
d214043
to
ccc8c89
Compare
Done :) |
ping @AnizR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Thanks for your contribution.
Code LGTM
/ocabot merge patch |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at c89c938. Thanks a lot for contributing to OCA. ❤️ |
As of now using
raise_server_exceptions=False
leads to all exceptions to be returned as 500.This PR aims to share the error handling between odoo FastAPIDispatcher and the starlette TestClient to get meaningful response in tests.
This also adds a log of 500 exceptions in testing which is very useful to get unhandled exceptions traceback while running the tests.