Skip to content

Reject request timeouts as Error - #30

Merged
shocknet-justin merged 1 commit into
stagingfrom
timeout-error-reject
Oct 19, 2026
Merged

shocknet-justin merged 1 commit into
stagingfrom
timeout-error-reject

Conversation

@shocknet-justin

Copy link
Copy Markdown
Member

Summary

  • sendRequest now rejects timeouts with new Error('failed to get response in time') instead of a bare string, matching publish/subscribe failures in the same function.
  • Timeout unit test asserts instanceof Error plus the message. Bump to 1.8.0.

This is a breaking change only for callers that identity-match the string (=== / rejects.toBe). err.message and instanceof Error start working. Apps that stay on 1.7.x are unchanged.

#27 already claims 1.7.4 — if that merges first, this version bump still applies as 1.8.0.

Test plan

  • npm test (51 passing)
  • After publish, Bridge noffer-request-handler.test.ts rejects.toBe("failed to get response in time") needs rejects.toThrow(...)

Callers that read err.message were getting undefined; 1.8.0 matches the rest of sendRequest.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shocknet-justin
shocknet-justin changed the base branch from main to staging September 18, 2026 06:04
@shocknet-justin
shocknet-justin merged commit 38675de into staging Oct 19, 2026
6 checks passed
@shocknet-justin
shocknet-justin deleted the timeout-error-reject branch October 19, 2026 17:20
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