lib/handlers/error.js
function (err) {
    var status = typeof err === 'number' ? err : err.status;

    if (!(err instanceof errors.HTTPError) && status) {
      return errors.create(status, err.message);
    }
    return err;
  }
function (err) {
    var status = typeof err === 'number' ? err : err.status;

    if (!(err instanceof errors.HTTPError) && status) {
      return errors.create(status, err.message);
    }
    return err;
  }
function ( err ) { var status = typeof err === 'number' ? err : err . status ; if ( ! ( err instanceof errors . HTTPError ) && status ) { return errors . create ( status , err . message ) ; } return err ; }
Checks to see if the error has a status property and if so converts it into an instance of HTTPError. Just returns this original error if no status is found.
Checks to see if the error has a status property and if so converts it into an instance of HTTPError . Just returns this original error if no status is found .