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 }