@better-auth-ui/core
Version:
Authentication components and data utilities for [Better Auth](https://better-auth.com), available for React and Solid.
6 lines (5 loc) • 422 B
TypeScript
import { Localization } from './localization.js';
/** Read both Better Fetch error bodies and client-side error codes. */
export declare function getAuthErrorCode(error: unknown): string | undefined;
/** Prefer API messages and codes, with localized fallbacks for client failures. */
export declare function getAuthErrorMessage(error: unknown, localization: Localization, mutationKey?: readonly unknown[]): string | null;