matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

Nested error JSON #3054

Open KitsuneRal opened 6 years ago

KitsuneRal commented 6 years ago

The 429 error returned from /room/{id}/send/m.room.message/ is accompanied by the JSON body nested as follows: {"errcode":"M_UNKNOWN","error":"{\"errcode\":\"M_LIMIT_EXCEEDED\",\"error\":\"Too Many Requests\",\"retry_after_ms\":4079}"}. The request URL and the response to it can be seen in the Travis build of libqmatrixclient (failing for other reasons): https://travis-ci.org/QMatrixClient/libqmatrixclient/jobs/360536201#L1281. Fortunately the HTTP code is correct.

Possibly related to #2322.

non-Jedi commented 6 years ago

See also https://github.com/matrix-org/matrix-python-sdk/issues/193. Does the JS-sdk handle this gracefully?

ShadowJonathan commented 4 years ago

According to the spec, the /send/ endpoint is not ratelimited (today), is this still a problem @KitsuneRal?

KitsuneRal commented 4 years ago

I believe it's still rate-limited - libQuotient CI confirms it. And I think it would be pretty much disastrous if it weren't.