docs: fix server range and write-retry claims in examples - #126
Merged
Conversation
Three documentation facts were wrong: - configuration.md stated the supported server range as >=0.3.0,<1.0.0; the real value in src/version.ts is >=0.8.0,<1.0.0. - The error-handling example claimed writes retry on UNAVAILABLE and DEADLINE_EXCEEDED. Per src/retry.ts, reads retry on UNAVAILABLE, DEADLINE_EXCEEDED, and RESOURCE_EXHAUSTED, while writes retry only on UNAVAILABLE unless an idempotencyKey is passed (which additionally enables DEADLINE_EXCEEDED). Reworded to match the source and the doc's own prose. - The server-info example used the deprecated serverVersion getter and omitted features. Switched to serverInfo with a realistic 0.8.x version and the features map. Closes #124 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bundle size
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
DEADLINE_EXCEEDEDby default, when in fact writes retry only onUNAVAILABLEunless anidempotencyKeyis set.serverVersiongetter and omitted thefeaturesmap, steering users toward an API that is being removed.Changes
docs/configuration.md: corrected supported server range to>=0.8.0,<1.0.0; switched the server-info example toserverInfowith a 0.8.x version and thefeaturesmap.examples/error-handling/main.ts: reworded retry guidance to matchsrc/retry.ts— reads retry onUNAVAILABLE/DEADLINE_EXCEEDED/RESOURCE_EXHAUSTED; writes retry only onUNAVAILABLEunlessidempotencyKeyis set (which additionally enablesDEADLINE_EXCEEDED).Test plan
npm run buildandnpx tsc --noEmitpass.cd examples && npm ci && npx tsc --noEmit) passes — the authoritative CI gate for the edited example.npm run lintand fullnpm test(255 tests) pass.src/version.ts,src/retry.ts,src/types.ts,src/client.ts.Closes #124