Skip to content

fix: add 30s request timeout to withSpinner to prevent hanging CLI commands#237

Draft
bukinoshita wants to merge 1 commit intomainfrom
fix/spinner-request-timeout-839b
Draft

fix: add 30s request timeout to withSpinner to prevent hanging CLI commands#237
bukinoshita wants to merge 1 commit intomainfrom
fix/spinner-request-timeout-839b

Conversation

@bukinoshita
Copy link
Copy Markdown
Member

@bukinoshita bukinoshita commented Apr 9, 2026

Summary by cubic

Add a 30s request timeout to withSpinner so CLI commands fail fast instead of hanging when the API is slow. Addresses BU-640 by preventing contact commands from blocking CI jobs.

  • Bug Fixes
    • Added withTimeout utility with REQUEST_TIMEOUT_MS = 30_000.
    • Wrapped SDK calls in withSpinner with the timeout; all withSpinner-based commands are now bounded.
    • Added tests for withTimeout and timeout handling in withSpinner.

Written for commit 6d98a55. Summary will update on new commits.

…mmands

Adds a withTimeout utility that wraps SDK call promises with a 30-second
deadline. When the timeout expires, the promise rejects with a structured
error that flows through the existing error handling in withSpinner.

This prevents contact commands (and all other SDK-backed commands) from
hanging indefinitely when the upstream API is slow or unresponsive.

Resolves BU-640

Co-authored-by: Bu Kinoshita <bukinoshita@users.noreply.github.com>
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.

2 participants