2023-11-08 16:26:04 +03:00

14 lines
316 B
JavaScript

export class DomainError extends Error {
constructor(message) {
super(message);
this.name = this.constructor.name;
Error.captureStackTrace(this, this.constructor);
}
}
export class RowNotFoundError extends DomainError {
constructor() {
super('Row not found.');
this.statusCode = 404;
}
}