Repository navigation
Conversation
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.
Closes #59
The default
timeoutwas 60 seconds, but SerpApi allows a search to run for up to 90 seconds on its side. Any search that finished between 60 and 90 seconds failed in the SDK withRequestTimeoutError, even though SerpApi completed it and the customer was charged for it.This may also explain #34 (
The request was timed outon v2.2.1).Changes
src/config.ts: defaulttimeout60000 → 95000 (the 90s server timeout plus 5s for network overhead).tests/validators_test.ts: new test that the default is longer than 90 seconds.afterEachnow restores the real default instead of a hard-coded 60000.Testing
deno fmt --check,deno lintanddeno task testall pass (13 passed, 2 ignored).Users who want to fail faster can still set
config.timeoutor passtimeoutper call.