The deserialize_from_body method raises a generic ValueError for unsupported content types, but the route handlers don't catch and convert it to appropriate HTTP error responses. This will result in a 500 Internal Server Error instead of the more appropriate 415 Unsupported Media Type error. Consider either:
- Raising a framework-agnostic exception type that adapters can catch and convert to appropriate HTTP errors, or
- Documenting that framework-specific route handlers should wrap these calls with appropriate error handling.
Originally posted by @Copilot in #221 (comment)
The
deserialize_from_bodymethod raises a genericValueErrorfor unsupported content types, but the route handlers don't catch and convert it to appropriate HTTP error responses. This will result in a 500 Internal Server Error instead of the more appropriate 415 Unsupported Media Type error. Consider either:Originally posted by @Copilot in #221 (comment)