Skip to content

Conversation

@zats
Copy link

@zats zats commented Jan 26, 2026

Summary

  • abort timeouts with Error objects so retries/logging treat them as real errors
  • align the e2e timeout helper with the same Error-based aborts

Rationale

  • Users are seeing noisy CLI failures like: “Non-error was thrown: "Timeout".” That comes from aborting with a string, which p-retry treats as a non-Error. Switching to Error preserves the same timeout behavior while making the failure type correct and the message actionable.

Testing

  • bun run lint (pass)
  • bun run test -- packages/clawdhub (pass)

Before

$ node dist/cli.js search image
❌ Non-error was thrown: "Timeout". You should only throw errors.

After

$ node dist/cli.js search image
table-image v1.0.0  Table Image  (0.332)
nano-banana-pro v1.0.1  Nano Banana Pro  (0.319)
vap-media v1.0.1  AI media generation API - Flux2pro, Veo3.1, Suno Ai  (0.281)
clawdbot-meshyai-skill v0.1.0  Meshy AI  (0.276)
venice-ai-media v1.0.0  Venice AI Media  (0.274)
daily-recap v1.0.2  Daily Recap  (0.260)
openai-image-gen v1.0.1  Openai Image Gen  (0.260)
bible-votd v1.0.1  Bible Verse of the Day  (0.248)
orf v1.0.1  ORF  (0.224)
smalltalk v1.0.1  Smalltalk  (0.161)

P.S. PR looks way less scary if you disable whitespace changes 🙂

Users have seen an elevated number of:\n  clawdhub search image\n  ✖ Non-error was thrown: "Timeout". You should only throw errors.\n\nInvestigation shows we were aborting with a string instead of an Error. Switching to controller.abort(new Error('Timeout')) makes retries/formatting treat it as a real error and clears the message.\n\nExample after change:\n  clawdhub search image\n  table-image v1.0.0  Table Image  (0.332)\n  nano-banana-pro v1.0.1  Nano Banana Pro  (0.319)\n  vap-media v1.0.1  AI media generation API - Flux2pro, Veo3.1, Suno Ai  (0.281)\n  clawdbot-meshyai-skill v0.1.0  Meshy AI  (0.276)\n  venice-ai-media v1.0.0  Venice AI Media  (0.274)\n  daily-recap v1.0.2  Daily Recap  (0.260)\n  openai-image-gen v1.0.1  Openai Image Gen  (0.260)\n  bible-votd v1.0.1  Bible Verse of the Day  (0.248)\n  orf v1.0.1  ORF  (0.224)\n  smalltalk v1.0.1  Smalltalk  (0.161)
@vercel
Copy link
Contributor

vercel bot commented Jan 26, 2026

@zats is attempting to deploy a commit to the Amantus Machina Team on Vercel.

A member of the Team first needs to authorize it.

Addresses Vercel review comment: clearTimeout was not called on error paths when fetch throws an exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant