concept response in category hapi

This is an excerpt from Manning's book hapi.js in Action.
To understand where hapi fits in, look at figure 1.2. You can see that hapi sits between Node and your own application’s code, providing an abstraction layer for working with HTTP requests and responses.
I hope by now you’ve gotten a decent feel for hapi.js. You should have picked up useful, practical skills that you can apply in building your own applications. You also should have a good grasp of the language and terms we use in hapi—things like routes, handlers, requests, responses, and so on.
hapi will understand that an error has occurred in the handler, and the response in this case will also be a 500 Internal Server Error response:
HTTP/1.1 500 Internal Server Error content-type: application/json; charset=utf-8 cache-control: no-cache content-length: 96 Date: Mon, 03 Aug 2015 09:00:43 GMT Connection: keep-alive {"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}Our response in this case, though, contains a JSON payload with additional information about the error. This kind of response for an error is more useful to clients than a plain-text response. They can parse the JSON and make decisions based on the details of the error. Whenever you pass a plain JavaScript Error object to reply(), hapi will respond in the same way—with a 500 internal server error response and a JSON payload.