hapi-boom-jsend
hapi plugin to convert boom errors into jsend responses
npm install hapi-boom-jsend
4XX responses
4XX responses created by boom are converted into jsend fail responses. The error
and statusCode
properties are left on the payload, while the others are coerced into jsend properties.
Before
After
5XX responses
5XX responses created by boom are converted into jsend error responses. The error
, statusCode
, and message
properties are left on the payload. status
and data
are added as well.
Before
After