function handleHttpError (res, httpError) {
  console.error(httpError)
  res
    .status(httpError.status)
    .json({
      err: httpError.expose ? httpError.message : 'Internal Server Error'
    })
    .end()
}
/**
 * handles the response to an http error
 * @param {Response} res the response object
 * @param {HttpError} httpError the http error
 */
handles the response to an http error
@param {Response} res the response object
@param {HttpError} httpError the http error
handles the response to an http error @param { Response } res the response object @param { HttpError } httpError the http error
function handleHttpError (res, httpError) {
  console.error(httpError)
  res
    .status(httpError.status)
    .json({
      err: httpError.expose ? httpError.message : 'Internal Server Error'
    })
    .end()
}
function handleHttpError ( res , httpError ) { console . error ( httpError ) res . status ( httpError . status ) . json ( { err : httpError . expose ? httpError . message : 'Internal Server Error' } ) . end ( ) }
handles the response to an http error
 @param {Response} res the response object
 @param {HttpError} httpError the http error
handles the response to an http error @param { Response } res the response object @param { HttpError } httpError the http error