From fd724d9de8d56862b53dd7f42a7fd479d62e22c0 Mon Sep 17 00:00:00 2001 From: zbigniew sobiecki Date: Tue, 17 Mar 2026 14:49:51 +0100 Subject: [PATCH] fix(webhooks): include Trello API response body in webhook creation errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 400 error from Trello was opaque — now includes the response body for diagnosis. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/api/routers/webhooks/trello.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/routers/webhooks/trello.ts b/src/api/routers/webhooks/trello.ts index 82bf9c16..218c2de9 100644 --- a/src/api/routers/webhooks/trello.ts +++ b/src/api/routers/webhooks/trello.ts @@ -59,9 +59,10 @@ export async function trelloCreateWebhook( }, ); if (!response.ok) { + const body = await response.text().catch(() => ''); throw new TRPCError({ code: 'INTERNAL_SERVER_ERROR', - message: `Failed to create Trello webhook: ${response.status}`, + message: `Failed to create Trello webhook: ${response.status} — ${body}`, }); } return (await response.json()) as TrelloWebhook;