From 9d852c3bf164bcf7436373b41dd7dd0b8cc7a460 Mon Sep 17 00:00:00 2001 From: Gilles Soulier Date: Sun, 24 May 2026 12:37:03 +0200 Subject: [PATCH] =?UTF-8?q?fix(todos):=20handleResponse=20g=C3=A8re=20204?= =?UTF-8?q?=20No=20Content=20(suppression=20sans=20SyntaxError)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/todos.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/api/todos.ts b/frontend/src/api/todos.ts index e145bd0..9f1e84e 100644 --- a/frontend/src/api/todos.ts +++ b/frontend/src/api/todos.ts @@ -53,6 +53,7 @@ const BASE = '/api/todos' async function handleResponse(res: Response): Promise { if (!res.ok) throw new Error(`${res.status} ${res.statusText}`) + if (res.status === 204) return undefined as T return res.json() as Promise }