From b3a2e00f433a50b36a0a9cb8cfb04657128a09e2 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Tue, 28 Sep 2021 10:58:32 +0200 Subject: [PATCH] comments --- matrix_webhook/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matrix_webhook/utils.py b/matrix_webhook/utils.py index 4c7917a..73c15ea 100644 --- a/matrix_webhook/utils.py +++ b/matrix_webhook/utils.py @@ -18,6 +18,8 @@ CLIENT = AsyncClient(conf.MATRIX_URL, conf.MATRIX_ID) def error_map(resp): """Map response errors to HTTP status.""" if resp.status_code == "M_UNKNOWN": + # in this case, we should directly consider the HTTP status from the response + # ref. https://matrix.org/docs/spec/client_server/r0.6.1#api-standards return resp.transport_response.status return ERROR_MAP[resp.status_code]