From b15f55eccd054c8b36c93ddaf1eceb666bc67bd5 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 18 Feb 2026 06:04:08 +0000 Subject: [PATCH] Fix double-wrapped error message in keybindings config loader When throwOnUnreadableConfig is true and the config file contains valid JSON that isn't an array, the throw on line 311 (inside the try block) was caught by the catch block, which re-wrapped it with the same prefix, producing a doubled message like: 'Unable to parse keybindings config at : Unable to parse keybindings config at : expected JSON array' Fix by detecting already-prefixed errors in the catch block and re-throwing them directly without wrapping. --- apps/server/src/keybindings.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/server/src/keybindings.ts b/apps/server/src/keybindings.ts index edbb08794c..df899a51ac 100644 --- a/apps/server/src/keybindings.ts +++ b/apps/server/src/keybindings.ts @@ -343,6 +343,12 @@ function loadCustomKeybindingsConfig( return []; } if (options?.throwOnUnreadableConfig) { + if ( + error instanceof Error && + error.message.startsWith("Unable to parse keybindings config at ") + ) { + throw error; + } throw new Error( `Unable to parse keybindings config at ${configPath}: ${ error instanceof Error ? error.message : String(error)