From 21765f8118cd256ea67ea2fc387fff322ec7a5c9 Mon Sep 17 00:00:00 2001 From: dotta Date: Thu, 19 Mar 2026 17:31:27 -0500 Subject: [PATCH] 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 --- ui/src/api/client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/src/api/client.ts b/ui/src/api/client.ts index 1071ba8f..d3bf0a5e 100644 --- a/ui/src/api/client.ts +++ b/ui/src/api/client.ts @@ -32,6 +32,7 @@ async function request(path: string, init?: RequestInit): Promise { errorBody, ); } + if (res.status === 204) return undefined as T; return res.json(); }