Open ordnungswidrig opened 10 years ago
If implemented this will fix #69, #122, #82
I'm having a hard time understanding what the proposed solution is, and I read the other threads. Could you reexplain?
@Christopher-Bui I propose to add another declaration in the resource definition for the media types of error responses and to negotiate the content type when necessary. As a default available-media-types
et. al. would be used.
This will also likely fix #76
Error responses might provide need a different set of media-types for the response, e.g. a resource the provides an image of types
image/jpg
andimage/png
might want to return a401 unauthorized
with the media typestext/plain
,text/html
orapplication/json
instead.In addition liberators handler see a negotiated media type after successful content negotiation. That means that for handlers like
handle-unauthorized
orhandle-service-not-available
cannot provide a matching response without additional work.