Fix trigger delete: handle 204 No Content in API client

The DELETE /routine-triggers/:id endpoint returns 204 No Content, but
the API client unconditionally called res.json() on all responses,
causing a JSON parse error that surfaced as "API route not found".

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
dotta
2026-03-19 17:31:27 -05:00
parent 9998cc0683
commit 21765f8118

View File

@@ -32,6 +32,7 @@ async function request<T>(path: string, init?: RequestInit): Promise<T> {
errorBody, errorBody,
); );
} }
if (res.status === 204) return undefined as T;
return res.json(); return res.json();
} }