Skip to content

Fix exception handler bug and improve error logging#111

Open
aydnOktay wants to merge 1 commit intoOpenGradient:mainfrom
aydnOktay:fix/exception-handler-and-readme-improvements
Open

Fix exception handler bug and improve error logging#111
aydnOktay wants to merge 1 commit intoOpenGradient:mainfrom
aydnOktay:fix/exception-handler-and-readme-improvements

Conversation

@aydnOktay
Copy link

This PR fixes a bug in the exception handler where reading the request body could fail if it was already consumed. The issue is now handled safely with try-except. Additionally, request body logging is limited to 1KB to prevent security and performance issues, and the request method is added to logs for better debugging. The grammar error in README ("a open-source" -> "an open-source") is also fixed.

- Fix critical bug in exception handler where request.body() could fail if body was already consumed
- Add safe error handling with try-except for request body reading
- Limit request body logging to 1KB to prevent logging large payloads and sensitive data
- Add request method to error logs for better debugging
- Fix grammar error in README: 'a open-source' -> 'an open-source'
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

Successfully merging this pull request may close these issues.

1 participant