-
Notifications
You must be signed in to change notification settings - Fork 12
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
GH-42: Fix: Middleware overhandling exceptions #44
GH-42: Fix: Middleware overhandling exceptions #44
Commits on Jul 24, 2024
-
pysnippetGH-42: testscases middleware overhandling excepts
- Unintended errors in code should be 500 - Non Http custom exceptions should be 500 - Handled exceptions should use handler (and be 418 in this case) But all of them are reported as 401 Unauthorized even when the entrypoint does not requires authorization.
Configuration menu - View commit details
-
Copy full SHA for 1cef8b8 - Browse repository at this point
Copy the full SHA 1cef8b8View commit details
Commits on Jul 25, 2024
-
pysnippetGH-42: Covering jwt cases and modify others
I added a case of exception that should be handled: as auth errors: jwt validation errors Using same approach as expiration check, but maybe it should be a HttpException in order to be properly handled both by fastapi and users. Also unexpected errors are not transformed to 500 either on the test setup. Maybe because we are not using Fastapi TestClient.
Configuration menu - View commit details
-
Copy full SHA for cb8b445 - Browse repository at this point
Copy the full SHA cb8b445View commit details -
pysnippetGH-42: error handling ignores library user code exceptions
- Removed the generic error handling in __call__() - Introduced specific error handling inside authenticate() for jwt decoding. - One use of jwt is in token generation in core, but in this case it won't be a authorization error but maybe a configuration one, we should see the details in logging or debugging platforms. - For sure, other authorization errors caught previously as Exception now run on the wild. Review required on that.
Configuration menu - View commit details
-
Copy full SHA for 089d648 - Browse repository at this point
Copy the full SHA 089d648View commit details
Commits on Jul 30, 2024
-
pysnippetGH-22: Using starlette like exception handling
That is: - raising starlette.authentication.AuthenticationError - providing an on_error callback turning starlet 400 into 401 to keep same api - letting the user provide their own on_error when instantiating the middleware.
Configuration menu - View commit details
-
Copy full SHA for b3ce107 - Browse repository at this point
Copy the full SHA b3ce107View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c93004 - Browse repository at this point
Copy the full SHA 8c93004View commit details
Commits on Jul 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 0041465 - Browse repository at this point
Copy the full SHA 0041465View commit details -
- Fix typing for lower versions of Python interpreter
- Use `default_on_error` instead of defining new one
Configuration menu - View commit details
-
Copy full SHA for 252c00e - Browse repository at this point
Copy the full SHA 252c00eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e2a832 - Browse repository at this point
Copy the full SHA 4e2a832View commit details -
Configuration menu - View commit details
-
Copy full SHA for fea2234 - Browse repository at this point
Copy the full SHA fea2234View commit details -
Configuration menu - View commit details
-
Copy full SHA for 00bf9ab - Browse repository at this point
Copy the full SHA 00bf9abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a0cc00 - Browse repository at this point
Copy the full SHA 3a0cc00View commit details
Commits on Aug 8, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ad31cba - Browse repository at this point
Copy the full SHA ad31cbaView commit details