matrix-org / matrix-org/matrix-python-sdk
JSONDecodeError when trying to interact with user in a non-healthy server
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 266
- Forks
- 118
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in matrix_client/api.py ungefähr bei den Zeilen 731–735, wo Nicht-JSON-Fehlerantworten geparst und behandelt werden. Reproduziere die 429-Antwort mit der gezeigten Fehler-Payload und überprüfe anschließend, dass die Interaktion dem vorhandenen Pfad für behandelte Fehler folgt, ohne JSONDecodeError auszulösen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100