@thalorlabs/errors
Version:
Enhanced exception handling system for TypeScript applications with comprehensive error classes and debugging capabilities
16 lines (15 loc) • 627 B
TypeScript
import CustomError from './CustomError';
/**
* Error for payment required scenarios.
*
* Used when payment is required to access resources or complete operations.
* Provides clear 402 error responses with optional payment context.
*
* @example
* throw new PaymentRequiredError('Payment required', 'subscription-expired', 'req-123');
*
* throw new PaymentRequiredError('Upgrade required', null, 'req-456', { plan: 'premium', cost: 9.99 });
*/
export declare class PaymentRequiredError extends CustomError {
constructor(message?: string, error?: string | null, requestId?: string, context?: Record<string, any>);
}