This commit is contained in:
2018-05-19 19:51:04 +03:00
parent 8f0509b8f2
commit 97921d6ccc
4 changed files with 53 additions and 4 deletions

View File

@@ -6,4 +6,12 @@ class NotFoundError extends Error {
}
}
module.exports = { NotFoundError };
class BadRequestError extends Error {
constructor(...args) {
super(...args);
Error.captureStackTrace(this, NotFoundError);
this.name = 'BadRequest';
}
}
module.exports = { NotFoundError, BadRequestError };