mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 23:57:49 +01:00
refactoring, fix todo removal from lists
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
class NotFoundError extends Error {
|
||||
constructor(...args) {
|
||||
constructor(text, ...args) {
|
||||
super(...args);
|
||||
Error.captureStackTrace(this, NotFoundError);
|
||||
this.name = 'NotFound';
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
|
||||
class BadRequestError extends Error {
|
||||
constructor(...args) {
|
||||
constructor(text, ...args) {
|
||||
super(...args);
|
||||
Error.captureStackTrace(this, NotFoundError);
|
||||
this.name = 'BadRequest';
|
||||
this.text = text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user