- Removed HttpError and refactored old code using it

This commit is contained in:
Alexis
2020-12-28 12:23:54 +01:00
parent 5f7e5499f7
commit f7a09c02ae
7 changed files with 311 additions and 164 deletions

View File

@@ -1,13 +0,0 @@
// Http error w/ http code
class HttpError extends Error {
constructor(code, message) {
super(message)
this.name = "HttpError"
this.code = code
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = {
HttpError
}