mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 11:59:29 +00:00
fix: replace instanceof Error with hasMessage() duck-typing in SSH retry paths (#1785)
wrapSshCall (agent-setup.ts) and spriteRetry (sprite.ts) used `instanceof Error` to extract error messages — an anti-pattern explicitly avoided throughout the rest of the codebase (consistent with comments in index.ts, commands.ts, manifest.ts, etc.). When errors cross module or bundling boundaries, instanceof returns false even for real Error objects, causing err.message to fall back to String(err) and producing `[object Object]` in the retry logs. Uses `hasMessage()` from shared/type-guards for consistent duck-typed narrowing. Agent: code-health Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
fa34d29b7e
commit
3a554a5ada
3 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@openrouter/spawn",
|
||||
"version": "0.7.4",
|
||||
"version": "0.7.5",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
"spawn": "cli.js"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue