docs: fix default values of maxClientErrors and snapshotHistorySecs#3828
Merged
Conversation
The JSDoc `@default` tags for `maxClientErrors` and `snapshotHistorySecs` in `SnapshotterOptions` did not match the effective defaults in the `Snapshotter` constructor. `maxClientErrors` defaults to 3 (not 1) and `snapshotHistorySecs` defaults to 30 (not 60), so the generated API reference on crawlee.dev showed the wrong values. Update the docs to match the implementation. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
maxClientErrors and `snapshotHistorySecsmaxClientErrors and snapshotHistorySecs
barjin
approved these changes
Jul 7, 2026
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.
The JSDoc
@defaulttags for twoSnapshotterOptionsfields do not match theeffective defaults in the
Snapshotterconstructor, so the generated APIreference on crawlee.dev publishes the wrong values.
In
packages/core/src/autoscaling/snapshotter.ts:maxClientErrorsis documented@default 1but the constructor destructuresit as
maxClientErrors = 3.createClientLoadSignalalso falls back tooptions.maxClientErrors ?? 3(client_load_signal.ts), so3is theeffective value.
snapshotHistorySecsis documented@default 60but the constructordestructures it as
snapshotHistorySecs = 30, which is the sole value feedingthe snapshot-history window (
snapshotHistoryMillis = snapshotHistorySecs * 1000).git blameshows the wrong JSDoc and the code defaults have coexisted since theinitial commit, so this is a longstanding docs mismatch rather than a regression.
This follows the same fix as commit
bab3b71(docs: fix default value of \maxUsedMemoryRatio``), which corrected the identical issue for another field inthis same interface.
Docs-only change; no behavior changes. Following the precedent, no test is added
(the corrected values are only observable through the private load-signal
internals).