Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-negotation for error handlers #152

Open
ordnungswidrig opened this issue Aug 8, 2014 · 4 comments
Open

Content-negotation for error handlers #152

ordnungswidrig opened this issue Aug 8, 2014 · 4 comments

Comments

@ordnungswidrig
Copy link
Member

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 and image/png might want to return a 401 unauthorized with the media types text/plain, text/html or application/json instead.

In addition liberators handler see a negotiated media type after successful content negotiation. That means that for handlers like handle-unauthorized or handle-service-not-available cannot provide a matching response without additional work.

@ordnungswidrig
Copy link
Member Author

If implemented this will fix #69, #122, #82

@cbui
Copy link

cbui commented Aug 23, 2014

I'm having a hard time understanding what the proposed solution is, and I read the other threads. Could you reexplain?

@ordnungswidrig
Copy link
Member Author

@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.

@ordnungswidrig
Copy link
Member Author

This will also likely fix #76

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants