-
Notifications
You must be signed in to change notification settings - Fork 5
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
As a user, I want to clearly see which formats are accepted by the API when a 406 error is raised #446
Comments
@al-niessner let's take a look at this ticket while we wait on testing the pds4+xml response. |
I agree it would be nice to have the errors come back with more information and in the case of 406 with a list of acceptable formats. However, this is a bigger statement than this ticket supposes and needs-to/should be addressed prior to fixing just the 406 error -- in other words, the implied infrastructure needed for this ticket is beyond the scope of the ticket as written. While the log is updated (mostly) when errors are generated, the Exception is used to translate to URL errors, but no other Exception information (messages, names, stack trace, etc) are used in detailing the URL error. I would like to have an expanded ticket that identifies what in the Exception message, if anything, should be passed to the URL error and thus that back to the caller. Also should that error content returned be HTML or JSON, the latter will not work well with browsers, or should a detection be done to support browsers different than cURL. Once all errors are being passed back with additional details for the end user, then this ticket can address whether or not the additive content to 406 should be expanded. Another problem with matching MIME types is wildcards. The standard allows for wildcards like Side note: the log already has the information you want for the 406 error. |
Hi @al-niessner , @jordanpadams I fully agree with you on the error management in the API, I created the ticket #443 We can also create a ticket for the wildcard management in the Accept header although I would put it in the icebox to start with. |
If the Accept: is not known, the error comes back as JSON. Is that the desirement or do you want it in text/html because you expect the browser to be the main client? |
💪 Motivation
...so that if I use an unaccepted format I can switch to an accepted format close to what I want.
📖 Additional Details
See recommendation on https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406
⚖️ Acceptance Criteria
Given
When I perform
Then I expect
⚙️ Engineering Details
The text was updated successfully, but these errors were encountered: