How often do we visit the list of HTTP status code to check or to inform the user about the status of the request? Well you might remember most of them, but would it not be cool to have more humanized mechanism to handle this?
Well here is BOOM HTTP-friendly error objects, as the name suggest it's make the error reporting more friendly.
Installing it is like any other node module: npm install boom
>varboom=require('boom');>varnotFound=boom.notFound("Sorry, it's not here :(")>notFound{[Error:Sorry,it's not here :(] data: null, isBoom: true, output: { statusCode: 404, payload: { statusCode: 404, error: 'NotFound', message: 'Sorry,it\'s not here :('},headers:{}},reformat:[Function]}>notFound.output.payload{statusCode:404,error:'Not Found',message:'Sorry, it\'s not here :('}
GIF FTW
Thanks to @WalmartLabs team for this module, specially for the maintainers Eran Hammer and Wyatt Preul