function errorHandler(response, error) {
    response
      .status(500)
      .send(error !== undefined && error !== null ? error.toString() : '')
  }
function errorHandler(response, error) {
    response
      .status(500)
      .send(error !== undefined && error !== null ? error.toString() : '')
  }
function errorHandler ( response , error ) { response . status ( 500 ) . send ( error !== undefined && error !== null ? error . toString ( ) : '' ) }
error handler for failure promises
error handler for failure promises