Custom media handlers: Unexpected issue when providing custom json handler
See original GitHub issueThis is in falcon-2.0
Look at the documentation here for using rapidjson for encoding/decoding json. By providing:
extra_handlers={'application/json': json_handler}
we are still left with the default handler for content-type application-json; charset=UTF-8
. This results in an unexpected behaviour when some client library (e.g. Retrofit for Android) includes the charset in the header.
While the documentation should be updated, the expected behaviour is that if the handler for application/json
is updated - it should also update the handler for variant with charset (or at least throw a warning) otherwise there is a possibility of hidden bugs.
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (18 by maintainers)
Top Results From Across the Web
Errors - Fastify
When a custom error handler has been defined through setErrorHandler , the custom error handler will receive the error passed to the done()...
Read more >A Guide to Error Handling in Express.js | Scout APM Blog
Handling Custom Errors. Express's default error-handling middleware is super helpful for beginners to take care of unexpected, unhandled errors.
Read more >Error Handling — Falcon 3.1.1 documentation
If a custom media type is used and the type includes a “+json” or “+xml” suffix, the default serializer will convert the error...
Read more >Testing Spring MVC @ExceptionHandler method with Spring ...
I have the following simple controller to catch any unexpected exceptions: @ControllerAdvice public class ExceptionController { ...
Read more >Python Logging Guide - Best Practices and Hands-on Examples
access logs and their format can be customized in conf. ... based on the handler's logging level and user-provided handler-specific filters.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll open a new issue regarding this, since it’s only tangentially related to this one
Ok sure.