Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314export async function parseFailureBody(response: Response) { const contentType = response.headers.get("content-type") ?? "";
try { if (contentType.includes("application/json")) { const json = (await response.json()) as { message?: string }; return json.message ?? JSON.stringify(json); } return await response.text(); } catch { return ""; }}