11. Error Responses

Chapter 11 of 18 · 15 min
EXERCISE

Create a custom exception class ModelNotFoundError and register a handler that returns 404 with problem details. Test the handler by making requests for non-existent resources and verifying the response structure matches RFC 7807.