diff --git a/client/src/App.tsx b/client/src/App.tsx index 17c50435..1454811a 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -137,7 +137,11 @@ const App = () => { if (savedHeaders) { try { return JSON.parse(savedHeaders); - } catch { + } catch (error) { + console.warn( + `Failed to parse custom headers: "${savedHeaders}", will try legacy migration`, + error, + ); // Fall back to migration if JSON parsing fails } } diff --git a/client/src/components/CustomHeaders.tsx b/client/src/components/CustomHeaders.tsx index 67aee18d..463f7333 100644 --- a/client/src/components/CustomHeaders.tsx +++ b/client/src/components/CustomHeaders.tsx @@ -153,6 +153,7 @@ const CustomHeaders = ({ size="sm" onClick={addHeader} className="text-xs px-2" + data-testid="add-header-button" > Add @@ -185,6 +186,7 @@ const CustomHeaders = ({ value={header.name} onChange={(e) => updateHeader(index, "name", e.target.value)} className="font-mono text-xs" + data-testid={`header-name-input-${index}`} />