UNPKG

@thalorlabs/errors

Version:

Enhanced exception handling system for TypeScript applications with comprehensive error classes and debugging capabilities

25 lines (24 loc) 1.02 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.NotImplementedError = void 0; const CustomError_1 = __importDefault(require("./CustomError")); /** * Error for not implemented functionality. * * Used when requested functionality is not yet implemented or available. * Provides clear 501 error responses with optional implementation context. * * @example * throw new NotImplementedError('Feature not implemented', 'coming-soon', 'req-123'); * * throw new NotImplementedError('Method not supported', null, 'req-456', { method: 'PATCH', endpoint: '/api/users' }); */ class NotImplementedError extends CustomError_1.default { constructor(message = 'Not Implemented', error, requestId, context) { super(501, `${message}${error ? `: ${error}` : ''}`, requestId, context); } } exports.NotImplementedError = NotImplementedError;