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