Skip to content

Catch media type not supported and media type not acceptable exceptions

Marcel Konrad requested to merge handle-not-acceptable into master

This MR adds some functionality to the ExceptionHandler, that allows it to properly process exception that cause a status 406 and status 415. As long as clients specified an accept header that spring can generate a response for (json, xml?), they will receive a usual error response object from the api. Supported media types are communicated through the accept header of the response (debatable). This way, we do not break the default error response format by introducing special fields. Maybe we should indeed look again at #442.

Merge request reports