-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
Description
I see, by design strictly only code and message are being passed to http response body.
https://github.com/restify/errors/blob/master/lib/baseClasses/HttpError.js#L92
https://github.com/restify/errors/blob/master/lib/baseClasses/HttpError.js#L147
Imagine a scenario when you want to pass down some extra metadata in the error response. For example validation details:
{
"code": "BadRequest",
"message": "",
"validation": { ... }
}
How do you guys pass extra error metadata in http response?
AdrieanKhisbe