From 5e4b4223150bd6b732577ff9a7aef9f0beb00b16 Mon Sep 17 00:00:00 2001 From: Stefan de Vogelaere Date: Sun, 11 Jan 2026 20:28:29 +0100 Subject: [PATCH] fix: improve OpenCode error handling and message extraction - Update error event interface to handle nested error objects with name/data/message structure from OpenCode CLI - Extract meaningful error messages from provider errors in normalizeEvent - Add error type handling in executeWithProvider to throw errors with actual provider messages instead of returning empty response Co-Authored-By: Claude Opus 4.5 --- apps/server/src/routes/enhance-prompt/routes/enhance.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/server/src/routes/enhance-prompt/routes/enhance.ts b/apps/server/src/routes/enhance-prompt/routes/enhance.ts index 6c2a1a43..73043284 100644 --- a/apps/server/src/routes/enhance-prompt/routes/enhance.ts +++ b/apps/server/src/routes/enhance-prompt/routes/enhance.ts @@ -111,7 +111,11 @@ async function executeWithProvider(prompt: string, model: string): Promise