@webxsid/nest-exception
Version:
A centralized exception handling module for NestJS applications. It provides structured error management, logging, and automatic exception handling.
16 lines • 507 B
TypeScript
import { HttpStatus } from '@nestjs/common';
interface AppError {
id: string;
code: string;
statusCode: HttpStatus;
message: string;
}
export declare class ExceptionRegistryService {
private readonly predefinedErrors;
private errors;
constructor(predefinedErrors?: AppError[]);
registerError(code: string, statusCode: HttpStatus, message: string): string;
getError(code: string): AppError | undefined;
}
export {};
//# sourceMappingURL=exception-registry.service.d.ts.map