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

Namespace (and possibly spec) HS_DISABLED error code #9237

Open Half-Shot opened 3 years ago

Half-Shot commented 3 years ago

As per https://github.com/matrix-org/matrix-react-sdk/pull/5576#discussion_r565245166

I'm mindful to namespace it now, as I don't think we make any assurances that random unspecced strings must remain the same.

Half-Shot commented 3 years ago

Turns out that the error response https://github.com/matrix-org/synapse/blob/f31f8e63198cfe46af48d788dbb294aba9155e5a/synapse/api/errors.py#L320 is also not specified.

anoadragon453 commented 3 years ago

This was added back in v1.7.2: https://github.com/matrix-org/synapse/pull/6173

Indeed, it should probably be namespaced or specced, just as monthly_active_user currently is. HS_DISABLED sounds rather homeserver agnostic, so I'd probably advocate for the latter.

anoadragon453 commented 3 years ago

Err, wait M_RESOURCE_LIMIT_EXCEEDED at least is specced: https://matrix.org/docs/spec/client_server/r0.6.1#api-standards

Half-Shot commented 3 years ago

The string M_RESOURCE_LIMIT_EXCEEDED, but the spec writer neglected to include the additional keys in the error body.