diff --git a/frontend/src/api/todos.ts b/frontend/src/api/todos.ts index 9720724..2f9c690 100644 --- a/frontend/src/api/todos.ts +++ b/frontend/src/api/todos.ts @@ -88,7 +88,7 @@ export async function updateTodo(id: string, data: TodoUpdate): Promise { export async function deleteTodo(id: string): Promise { const res = await fetch(`${BASE}/${id}`, { method: 'DELETE' }) - if (!res.ok) throw new Error(`${res.status} ${res.statusText}`) + await handleResponse(res) } export async function postponeTodo(id: string, days: 1 | 7): Promise {