UNPKG

trapx

Version:

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

19 lines (18 loc) 547 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InternalServerError = void 0; const BaseError_1 = require("./BaseError"); class InternalServerError extends BaseError_1.BaseError { constructor(message, metadata = {}) { super({ message, statusCode: 500, metadata: { ...metadata, code: 'INTERNAL_SERVER_ERROR', isOperational: false } }); } } exports.InternalServerError = InternalServerError;