From 9c1b48a5e4a6839cdfdf11b797c6a5a9f840e6aa Mon Sep 17 00:00:00 2001 From: Tim Alby Date: Fri, 5 Jul 2019 15:23:52 +0200 Subject: [PATCH] remove ErrorWithStatusCode --- libraries/o-error/index.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/libraries/o-error/index.js b/libraries/o-error/index.js index 3cde7b6c1f..dd00b677bb 100644 --- a/libraries/o-error/index.js +++ b/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.