Formats a Boom error according to the JSON API spec
npm install --save boom-to-json-api
const Boom = require('boom');
const convert = require('boom-to-json-api');
const err = Boom.notFound('Sorry, nothing to see here!');
const body = convert(err);
console.log(body);
// {
// errors: [
// {
// status: '404',
// title: 'Not Found',
// detail: 'Sorry, nothing to see here!'
// }
// ]
// }