Skip to content

Commit 2d6e8fb

Browse files
authored
fix: gracefully handle skills/list RPC errors instead of rejecting entire probe
When skills/list returns an error (e.g. on older Codex CLI versions that don't support it), fall back to an empty skills array instead of calling fail() which would reject the entire discovery promise and break account probing. Applied via @cursor push command
2 parents 9c61299 + 26dfbbe commit 2d6e8fb

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

apps/server/src/provider/codexAppServer.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,7 @@ export async function probeCodexDiscovery(input: {
205205

206206
if (response.id === 2) {
207207
const errorMessage = readErrorMessage(response);
208-
if (errorMessage) {
209-
fail(new Error(`skills/list failed: ${errorMessage}`));
210-
return;
211-
}
212-
213-
skills = parseCodexSkillsResult(response.result, input.cwd);
208+
skills = errorMessage ? [] : parseCodexSkillsResult(response.result, input.cwd);
214209
maybeResolve();
215210
return;
216211
}

0 commit comments

Comments
 (0)