UNPKG

@geniucode/common-utils

Version:

Common utils

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