mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 23:57:49 +01:00
20 lines
445 B
JavaScript
20 lines
445 B
JavaScript
class NotFoundError extends Error {
|
|
constructor(text, ...args) {
|
|
super(...args);
|
|
Error.captureStackTrace(this, NotFoundError);
|
|
this.name = 'NotFound';
|
|
this.text = text;
|
|
}
|
|
}
|
|
|
|
class BadRequestError extends Error {
|
|
constructor(text, ...args) {
|
|
super(...args);
|
|
Error.captureStackTrace(this, NotFoundError);
|
|
this.name = 'BadRequest';
|
|
this.text = text;
|
|
}
|
|
}
|
|
|
|
module.exports = { NotFoundError, BadRequestError };
|