matrix-org / matrix-org/matrix-python-sdk
JSONDecodeError when trying to interact with user in a non-healthy server
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 266
- Fork
- 118
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in matrix_client/api.py, intorno alle righe 731–735, dove le risposte di errore non JSON vengono analizzate e gestite. Riproduci la risposta 429 contenente il payload di errore mostrato, quindi verifica che l’interazione segua il percorso esistente per gli errori gestiti senza generare JSONDecodeError.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 45/100