react-azure-config
Version:
🚀 The Ultimate Multi-App Configuration Library! CRITICAL BUG FIXES: Prefixed environment keys no longer sent to Azure. Complete architectural redesign with bulletproof fallback system. Enterprise-grade Azure integration and monorepo support.
23 lines • 1.24 kB
TypeScript
export declare enum ErrorType {
CONFIGURATION_ERROR = "CONFIGURATION_ERROR",
AZURE_CLIENT_ERROR = "AZURE_CLIENT_ERROR",
NETWORK_ERROR = "NETWORK_ERROR",
CACHE_ERROR = "CACHE_ERROR",
KEYVAULT_ERROR = "KEYVAULT_ERROR",
VALIDATION_ERROR = "VALIDATION_ERROR",
SERVER_ERROR = "SERVER_ERROR"
}
export declare class ConfigurationError extends Error {
readonly type: ErrorType;
readonly context: Record<string, unknown> | undefined;
readonly originalError: Error | undefined;
constructor(type: ErrorType, message: string, context?: Record<string, unknown>, originalError?: Error);
toJSON(): Record<string, unknown>;
}
export declare const handleError: (error: unknown, type: ErrorType, context?: Record<string, unknown>, logLevel?: "debug" | "info" | "warn" | "error") => ConfigurationError;
export declare const getErrorMessage: (error: unknown) => string;
export declare const isAzureError: (error: unknown, code?: string) => boolean;
export declare const isNetworkError: (error: unknown) => boolean;
export declare const isRecoverableError: (error: unknown) => boolean;
export declare const createUserMessage: (error: ConfigurationError) => string;
//# sourceMappingURL=error-handler.d.ts.map