Repository navigation
Reject request timeouts as Error - #30
Open
shocknet-justin wants to merge 1 commit into
Open
shocknet-justin wants to merge 1 commit into
shocknet-justin wants to merge 1 commit into
Conversation
Callers that read err.message were getting undefined; 1.8.0 matches the rest of sendRequest. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sendRequestnow rejects timeouts withnew Error('failed to get response in time')instead of a bare string, matching publish/subscribe failures in the same function.instanceof Errorplus the message. Bump to 1.8.0.This is a breaking change only for callers that identity-match the string (
===/rejects.toBe).err.messageandinstanceof Errorstart 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)noffer-request-handler.test.tsrejects.toBe("failed to get response in time")needsrejects.toThrow(...)