UNPKG

@thalorlabs/errors

Version:

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

16 lines (15 loc) 600 B
import CustomError from './CustomError'; /** * Error for authentication failures. * * Used when authentication credentials are invalid or missing. * Provides clear 401 error responses with optional authentication context. * * @example * throw new AuthenticationError('Invalid token', 'token-expired', 'req-123'); * * throw new AuthenticationError('Authentication failed', null, 'req-456', { provider: 'oauth' }); */ export declare class AuthenticationError extends CustomError { constructor(message?: string, error?: string | null, requestId?: string, context?: Record<string, any>); }