mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
remove ErrorWithStatusCode
This commit is contained in:
parent
c63cc52fda
commit
9c1b48a5e4
1 changed files with 0 additions and 17 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue