-
Notifications
You must be signed in to change notification settings - Fork 22
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
Gavel.js should print an invalid media type #88
Comments
I assume this error message comes from |
I've issued a pull request into |
Since there has been no visible progress on this issue in almost a month, I've pinged the |
The |
Yes, we could. |
Let's analyze where would the users of Gavel experience such error:
gavel.js/lib/units/validateBody.js Lines 41 to 48 in a6b65a4
gavel.js/lib/units/validateBody.js Lines 147 to 152 in a6b65a4
Let's analyze each of these two calls of
|
After further investigation, it appears impossible for When determining the body type we are using this function: gavel.js/lib/units/validateBody.js Lines 68 to 88 in a6b65a4
In case we have a "Content-Type" header, and it's malformed, this function will go through the This being said, the input to That being said, at the moment I don't see a scenario when Gavel would output the invalid media type where such would be included. |
Closing this as it's not possible to reach the scenario when |
Given API Blueprint like this:
Gavel throws an error that the media type is invalid. It would be nice if the error message contains the actual value. Instead of:
there would be:
The text was updated successfully, but these errors were encountered: