Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pass-through HttpError caught in multipart handler (#867)
- Consumers of express-openapi-validator have access to the custom error types via exported object: error (e.g. error.BadRequest). - If the multipart handler throws, for example from the multer storage engine, check whether the err instance is already an HttpError. If so, it can be passed-through as is. This is mostly useful for setting the HTTP status code.
- Loading branch information