Skip to content

Commit bf8b395

Browse files
committed
Add limit_type to M_RESOURCE_LIMIT_EXCEEDED error code
1 parent 55ec009 commit bf8b395

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# MSC0000: Add limit_type to M_RESOURCE_LIMIT_EXCEEDED error code
2+
3+
## Proposal
4+
5+
1. Add an optional `limit_type` field to the body of the [`M_RESOURCE_LIMIT_EXCEEDED`] error response that has the same
6+
definition as it does for [`m.server_notice`]:
7+
8+
> The kind of usage limit the server has exceeded
9+
10+
And on the possible values:
11+
12+
> The specified values for `limit_type` are:
13+
> `monthly_active_user` The server’s number of active users in the last 30 days has exceeded the maximum. New
14+
> connections are being refused by the server. What defines “active” is left as an implementation detail, however
15+
> servers are encouraged to treat syncing users as “active”.
16+
17+
2. Update the description of `admin_contact` so that instead of "a place to reach out to" that it is the same definition
18+
as the `admin_contact` field on the [`m.server_notice`] which says "a URI giving a contact method for the server
19+
administrator".
20+
21+
This amounts to unifying the representation of a server resource limit being exceeded in an error code and the server
22+
notice.
23+
24+
## Potential issues
25+
26+
None anticipated. Optional extra fields on the error.
27+
28+
## Alternatives
29+
30+
None considered.
31+
32+
## Security considerations
33+
34+
None.
35+
36+
## Unstable prefix
37+
38+
Ideally implementations would use an unstable prefix of something like `io.element.mscXXX.limit_type` whilst the
39+
MSC is in development.
40+
41+
However, it is noted that the implementation in Synapse has existed since
42+
[2018](https://github.com/matrix-org/synapse/pull/3707) and so the unprefixed `limit_type` is being used in the wild.
43+
As such some clients also support this unprefixed version.
44+
45+
## Dependencies
46+
47+
None.
48+
49+
[`M_RESOURCE_LIMIT_EXCEEDED`]: https://spec.matrix.org/v1.16/client-server-api/#other-error-codes
50+
[`m.server_notice`]: https://spec.matrix.org/v1.16/client-server-api/#mroommessagemserver_notice

0 commit comments

Comments
 (0)