algolia / algolia/algoliasearch-client-python
runtime error trying to deserialise non json responses
- 主要语言
- Python
- 星标
- 207
- 派生
- 63
- PR 合并指标
- 30 天内没有已合并 PR
描述
The Python API client throws a runtime exception while attempting to desialize a non json response. Note that, as described on the JavaScript API Client, we should **NOT** deserialise responses on those cases:
```js
isTimedOut || isNetworkError(response) || (~~(status / 100) !== 2 && ~~(status / 100) !== 4)
```
Source: https://github.com/algolia/algoliasearch-client-javascript/blob/master/packages/transporter/src/concerns/retryDecision.ts#L12.
Solution: Create a pull request that ensures that no `response.json()` is performed on the cases mentioned above.
贡献指南
调研方向
从 Python API 客户端的响应处理入手,并将其行为与链接的 retryDecision.ts JavaScript 逻辑进行比较。验证对于超时、网络错误以及既不是 2xx 也不是 4xx 的状态,response.json() 会被跳过;当这些情况不再引发反序列化异常时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100