Repository navigation
fix: validate per-request transport options - #422
Merged
JoshMock merged 2 commits intoNov 13, 2026
Merged
Conversation
|
💚 CLA has been signed |
JoshMock
approved these changes
Oct 15, 2026
JoshMock
left a comment
Member
There was a problem hiding this comment.
LGTM. You'll need to sign the CLA before we can merge this PR, though. If that isn't signed, we'll close this unmerged soon.
Contributor
Author
Signed the CLA |
JoshMock
enabled auto-merge (squash)
November 2, 2026 18:34
Contributor
Author
|
Hi @JoshMock, thanks again for the review! The CLA is signed and all checks pass, so this should be ready whenever you have a moment to merge. Happy to rebase onto main if needed. |
JoshMock
disabled auto-merge
November 13, 2026 16:08
JoshMock
enabled auto-merge (squash)
November 13, 2026 16:08
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.
Per-request transport overrides currently bypass the constructor’s configuration checks. A negative retry count can skip the request loop, while response-size overrides can exceed Node’s supported buffer limits.
Use the same validation for constructor options and per-request overrides of
maxRetries,maxResponseSize, andmaxCompressedResponseSize. Also enforce the stated nonnegative-integer contract for retry counts in both paths, rejecting strings, fractional values, NaN, and Infinity withConfigurationError.Fixes #405.
Validation:
npm test(CommonJS/ESM builds, lint, unit and acceptance tests). The new regression test exercises eight invalid configurations through both entry points; it produces 13 failed assertions on unchanged main. Existing valid retry and response-size override tests remain covered by the full suite.