Răsfoiți Sursa

remove ErrorWithStatusCode

Tim Alby 7 ani în urmă
părinte
comite
9c1b48a5e4
1 a modificat fișierele cu 0 adăugiri și 17 ștergeri
  1. 0 17
      libraries/o-error/index.js

+ 0 - 17
libraries/o-error/index.js

@@ -50,23 +50,6 @@ class ErrorTypeError extends Error {
   }
 }
 
-/**
- * Base class for errors with a corresponding HTTP status code.
- *
- * @extends ErrorTypeError
- */
-class ErrorWithStatusCode extends ErrorTypeError {
-  /**
-   * @param {?number} statusCode an HTTP status code
-   * @param {object} options as for ErrorTypeError
-   */
-  constructor ({ statusCode, ...options }) {
-    super(options)
-    this.statusCode = statusCode || 500
-  }
-}
-exports.ErrorWithStatusCode = ErrorWithStatusCode
-
 /**
  * Return the `info` property from `error` and recursively merge the `info`
  * properties from the error's causes, if any.