You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 10, 2024. It is now read-only.
Hmm... maybe I simply don't get it, but why are errors handled differently throughout the osprey-method-handler, osprey-router and osprey-server?
I would believe that osprey would format the error messages according in that way, that its own error handler could format them, but this only seems to be the case in osprey-method-handler when it's calling createValidationError. Even there, some errors (like unexpected content type) are not eligible for the osprey error handler, because they use the "createError" function without adding errors to the requestErrors array, that the error handler requires.
Is that on purpose? Because, currently, errors like an invalid path according to the RAML specification are rendered as an HTML page (because of Express' own error handler) for requests specifying Accept: application/json...
The text was updated successfully, but these errors were encountered:
Hmm... maybe I simply don't get it, but why are errors handled differently throughout the osprey-method-handler, osprey-router and osprey-server?
I would believe that osprey would format the error messages according in that way, that its own error handler could format them, but this only seems to be the case in osprey-method-handler when it's calling createValidationError. Even there, some errors (like unexpected content type) are not eligible for the osprey error handler, because they use the "createError" function without adding errors to the requestErrors array, that the error handler requires.
Is that on purpose? Because, currently, errors like an invalid path according to the RAML specification are rendered as an HTML page (because of Express' own error handler) for requests specifying
Accept: application/json
...The text was updated successfully, but these errors were encountered: