Default client timeout (60s) is shorter than the server-side timeout (90s)

未关闭 适合新手
#59 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@Babyy-dev 已经在做这个了。

开始于 2026年11月20日。

  • #60 来自 @Babyy-dev —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
85/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃

调研方向

打开 src/config.ts,找到 timeout: 60000 默认值;将其提高到 95000 ms(考虑到超过 90 s 服务器超时的网络开销),然后更新 README 中对应的值。在仓库和 README 中 Grep 60000 和 timeout,确保没有其他默认值或文档示例仍不一致。完成意味着 SDK 默认值和 README 都写明新值,且现有测试套件仍然通过;issue #34 是促成此事的报告,不属于本次更改。

由索引模型根据 Issue 内容生成。

描述

The SDK's default request timeout is 60 seconds (timeout: 60000 in src/config.ts, also documented in the README), but SerpApi's server-side timeout is 90 seconds.

For slower searches that finish between 60 and 90 seconds, the SDK gives up with RequestTimeoutError even though SerpApi would have returned a result. The customer gets an error, and the search may still be completed and charged on our side.

This may be the cause of #34 (customer seeing "The request was timed out" on v2.2.1).

Proposal: raise the default timeout to at least 90000 ms (or slightly above, e.g. 95000, to allow for network overhead), and update the README to match.

主要语言
TypeScript
星标
104
派生
36
平均合并
4 天 23 小时
30 天内合并 PR
1

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

serpapi/serpapi-javascript 的其他 Issue

查看 serpapi/serpapi-javascript 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。