gemini-cost-tracker
Version:
CLI tool to display token usage and costs for Gemini and Vertex AI
14 lines • 997 B
TypeScript
import { AppError } from '../types/index.js';
export declare class ErrorHandler {
static handle(error: unknown, context?: Record<string, unknown>): AppError;
static createValidationError(message: string, details?: unknown): AppError;
static createAuthError(message?: string, details?: unknown): AppError;
static createNetworkError(message?: string, details?: unknown): AppError;
static createFileError(message?: string, details?: unknown): AppError;
static createConfigError(message: string, details?: unknown): AppError;
static isNetworkError(error: Error): boolean;
static isAuthError(error: Error): boolean;
}
export declare function withErrorHandling<T extends unknown[], R>(fn: (...args: T) => Promise<R>, context?: Record<string, unknown>): (...args: T) => Promise<R>;
export declare function withSyncErrorHandling<T extends unknown[], R>(fn: (...args: T) => R, context?: Record<string, unknown>): (...args: T) => R;
//# sourceMappingURL=errorHandler.d.ts.map