From c610ad2a7de1502336001ff9042dadda0072b3c1 Mon Sep 17 00:00:00 2001 From: ralksta Date: Fri, 13 Mar 2026 12:31:21 +0100 Subject: [PATCH] fix(map): show HTTP status code in error message for easier debugging --- components/MapView.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/MapView.tsx b/components/MapView.tsx index d258709..327173d 100644 --- a/components/MapView.tsx +++ b/components/MapView.tsx @@ -35,7 +35,10 @@ export function MapView() { // Fetch map data const res = await fetch('/api/map'); if (!res.ok) { - setError('Failed to load map data'); + let detail = ''; + try { detail = await res.text(); } catch { /* ignore */ } + console.error('[Map] API error', res.status, detail); + setError(`Failed to load map data (${res.status})`); setLoading(false); return; }