UNPKG

@geniucode/common-utils

Version:

Common utils

17 lines 554 B
import { CustomError } from './custom-error'; import { ErrorStatusCode } from '../config/errors'; export class NotFoundError extends CustomError { message; constructor(message = '[ERROR] Not Found') { super(message, ErrorStatusCode.notFound); this.message = message; Object.setPrototypeOf(this, NotFoundError.prototype); } setStatusCode(statusCode) { this.statusCode = statusCode; } serializeErrors() { return [{ message: this.message }]; } } //# sourceMappingURL=not-found-error.js.map