/** * Presentation-safe error copy. Transport diagnostics stay on `raw` / structured * envelopes; this module only decides what a user may see. */ export declare const MAX_USER_FACING_ERROR_LENGTH = 500; export declare const MAX_ERROR_TOAST_LENGTH = 500; export declare const AUTH_CONNECTIVITY_MESSAGE = "Unable to reach the authentication service. Check your connection."; export declare const AUTH_UPSTREAM_UNAVAILABLE_MESSAGE = "Authentication service is temporarily unavailable. Try again shortly."; export declare const AUTH_REQUEST_FAILED_MESSAGE = "Authentication request failed. Please try again."; export declare const AUTH_RATE_LIMITED_MESSAGE = "Too many attempts. Try again later"; export declare const AUTH_TOAST_FALLBACK_MESSAGE = "Something went wrong. Please try again."; export declare const AUTH_CONTAINED_ERROR_FALLBACK_MESSAGE = "Something went wrong while rendering this auth panel."; export interface ErrorPresentationOptions { fallback: string; maxLength?: number; } export interface UpstreamAuthFailureLike { error?: string | null; errorDetails?: { code?: string | null; message?: string | null; status?: number; } | null; ok?: boolean; raw?: unknown; status?: number; } export declare function looksLikeMarkup(value: string): boolean; export declare function looksLikeStackTrace(value: string): boolean; export declare function looksLikeSerializedDocument(value: string): boolean; export declare function isUnsafeUserFacingMessage(value: string): boolean; export declare function looksLikeRuntimeException(value: string): boolean; /** * Developer diagnostic label. Never use as the primary user-facing description. */ export declare function getTechnicalErrorMessage(error: unknown): string | null; export declare function toSafeUserFacingMessage(input: unknown, options: ErrorPresentationOptions): string; /** * Rewrite an Athena auth result so presentation fields are safe while `raw` * keeps the original upstream body for diagnostics. */ export declare function normalizeUpstreamAuthFailure(result: UpstreamAuthFailureLike): UpstreamAuthFailureLike;