index.js
function HTTPError(statusCode, message) {
    if (!(this instanceof HTTPError)) {
      return new HTTPError(statusCode, message);
    }

    assert(statusCode >= 400, 'Not a valid HTTP error code');

    this.statusCode = statusCode;
    this.code = statusCode;
    this.message = message || defaultMessage;
  }
function HTTPError(statusCode, message) {
    if (!(this instanceof HTTPError)) {
      return new HTTPError(statusCode, message);
    }

    assert(statusCode >= 400, 'Not a valid HTTP error code');

    this.statusCode = statusCode;
    this.code = statusCode;
    this.message = message || defaultMessage;
  }
function HTTPError ( statusCode , message ) { if ( ! ( this instanceof HTTPError ) ) { return new HTTPError ( statusCode , message ) ; } assert ( statusCode >= 400 , 'Not a valid HTTP error code' ) ; this . statusCode = statusCode ; this . code = statusCode ; this . message = message || defaultMessage ; }
Error constructor for creating error objects with a given status code
@param {Number} statusCode - The HTTP status code
@param {String} message - The default error message
Error constructor for creating error objects with a given status code