matrix-org / matrix-org/matrix-python-sdk

JSONDecodeError when trying to interact with user in a non-healthy server

オープン
#282 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
266
フォーク
118
PR マージ指標
30日以内にマージされた PR はありません

説明

We got a small federation running for Raiden Network, and because of some disk full issue, one of the servers crashed. Following it, the healthy ones started returning some unexpected responses for interactions with users on the healthy ones.
E.g. trying to invite an user in the unhealthy server to a room in the healthy one, the invite request returned:

<Response [429]>
{"errcode":"M_UNKNOWN","error":"Unknown Status"}

but from
https://github.com/matrix-org/matrix-python-sdk/blob/e366d52850f2bd948e9613022b735054616cfe0b/matrix_client/api.py#L731-L735
if the error isn't a json, json.JSONDecodeError will be raised.
Quick fix is to add json.JSONDecodeError to the handled errors in L734
Full stack traces and context can be found in raiden-network/raiden#2603

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

matrix_client/api.py の 731~735 行付近から始めます。ここでは JSON ではないエラーレスポンスが解析され、処理されています。示されているエラーペイロードを含む 429 レスポンスを再現し、その後、JSONDecodeError を発生させずに、インタラクションが既存の処理済みエラーのパスに従うことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
api, backend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

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

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