From 8e7e1694d5e9fdeab07de28fc6ba1f96a6c5878c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Tr=C3=A1vn=C3=ADk?= Date: Mon, 1 Dec 2025 14:42:52 +0100 Subject: [PATCH] more verbose error handling --- app/client/components/export-dialog.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/client/components/export-dialog.tsx b/app/client/components/export-dialog.tsx index 937eab9b..f36314cc 100644 --- a/app/client/components/export-dialog.tsx +++ b/app/client/components/export-dialog.tsx @@ -61,7 +61,8 @@ async function exportFromApi(endpoint: string, filename: string, options: Export const res = await fetch(url, { credentials: "include" }); if (!res.ok) { - throw new Error(`Export failed: ${res.statusText}`); + const errorText = await res.text().catch(() => res.statusText); + throw new Error(errorText || `HTTP ${res.status}`); } const data = await res.json();