/** * Represents a custom application error with additional metadata. * * Extends the native `Error` class to include HTTP status codes, operational flags, * optional error codes, and additional details for enhanced error handling. * * @example * ```typescript * throw new AppError('Resource not found', 404, 'NOT_FOUND'); * ``` * * @remarks * Use this class to throw errors that should be handled gracefully by the application. * * @property statusCode - The HTTP status code associated with the error. * @property isOperational - Indicates if the error is operational (expected) or a programming error. * @property errorCode - An optional application-specific error code. * @property details - Optional additional information about the error. * * @param message - The error message. * @param statusCode - The HTTP status code (default: 500). * @param errorCode - An optional application-specific error code. * @param isOperational - Whether the error is operational (default: true). * @param details - Optional additional error details. */ export declare class AppError extends Error { readonly statusCode: number; readonly isOperational: boolean; readonly errorCode?: string; readonly details?: any; constructor(message: string, statusCode?: number, errorCode?: string, isOperational?: boolean, details?: any); } export declare class AuthenticationError extends AppError { constructor(message?: string); } export declare class AuthorizationError extends AppError { constructor(message?: string); } export declare class NotFoundError extends AppError { constructor(resource?: string); } export declare class ConflictError extends AppError { constructor(message: string); } export declare class RateLimitError extends AppError { constructor(message?: string); } export declare class InternalServerError extends AppError { constructor(message?: string, details?: any); } //# sourceMappingURL=AppError.d.ts.map