/** * Normalize fetch error handling across hooks. */ export function handleFetchError( err: unknown, setError: (value: string | null) => void, fallback: string = "Unknown error", ): void { if (err instanceof DOMException && err.name === "AbortError") { return; } setError(err instanceof Error ? err.message : fallback); }