Skip to content
This repository was archived by the owner on May 10, 2024. It is now read-only.
This repository was archived by the owner on May 10, 2024. It is now read-only.

Varying error handling throughout Osprey #165

@dploeger

Description

@dploeger

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions