UNPKG

trapx

Version:

A plug-and-play middleware for standardized error handling in TypeScript-based Express.js applications

15 lines (14 loc) 429 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NotFoundError = void 0; const BaseError_1 = require("./BaseError"); class NotFoundError extends BaseError_1.BaseError { constructor(message, metadata = {}) { super({ message, statusCode: 404, metadata: { ...metadata, code: 'NOT_FOUND' } }); } } exports.NotFoundError = NotFoundError;