export interface FetchError extends Error { response?: { status: number; statusText: string; data: any; headers: Record; } | undefined; config?: { url: string; method?: string; } | undefined; } export declare const isFetchError: (error: any) => error is FetchError; export declare const isAuthFailureStatus: (status: number | undefined) => boolean; /** * Guidance shown when a request fails with 401/403 and the CLI/client did not * attach an Authorization header. Environments may still inject auth into * outbound requests; this message covers both "token missing" and "injection * failed / invalid". */ export declare const MISSING_AUTH_GUIDANCE: string; export declare const maybeEnrichFetchError: (error: T) => T; /** * When a request was made without an Authorization header and the server * responded 401/403, rewrite the error message with missing-auth guidance. * Returns the original error unchanged otherwise. */ export declare const maybeEnrichMissingAuthFetchError: (error: T, hadAuthorizationHeader: boolean) => T; //# sourceMappingURL=errors.d.ts.map