mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-06 15:22:12 +03:00
fix(types): preserve thinking signature recovery failure (#9114)
Validated in local merge-train (devbox-vm-06-dev002) @ combined-tip (FAST gates: typecheck/complexity/cognitive/changelog/vitest — only pre-existing audit.test.ts flake). Evidence: /home/diegosouzapw/dev/proxys/OmniRoute/.claude/worktrees/merge-train-20260805-222248-suite.log
This commit is contained in:
@@ -0,0 +1 @@
|
||||
- **fix(types):** preserved the known first-failure record while reading Anthropic thinking-signature recovery details so TypeScript 7 keeps the retry result union narrow ([#8484](https://github.com/diegosouzapw/OmniRoute/issues/8484))
|
||||
@@ -69,7 +69,9 @@ export async function recoverAnthropicThinkingSignature(args: {
|
||||
return args.execute(requestBody);
|
||||
},
|
||||
getError: async (result) => {
|
||||
if (result === firstFailure) return { status: result.status, message: result.message };
|
||||
if (result === firstFailure) {
|
||||
return { status: firstFailure.status, message: firstFailure.message };
|
||||
}
|
||||
if (result.response.ok) return null;
|
||||
const details = await args.parseError(result.response.clone());
|
||||
return { status: details.statusCode, message: details.message };
|
||||
|
||||
Reference in New Issue
Block a user