algolia / algolia/algoliasearch-client-python

runtime error trying to deserialise non json responses

オープン
#480 コメント 0 件 リアクション 3 件 担当者 0 名 GitHub で見る
Bug
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。