Skip to content

Conversation

@hughns
Copy link
Member

@hughns hughns commented Aug 29, 2025

Rendered

Implementations:

In the prototype implementation when this error code is encountered for a file upload, it is rendered as follows for a soft limit:

image

And like this for a hard limit:

image

I am employed by Element to write this MSC on behalf of the Matrix Foundation for use on the matrix.org homeserver. Hence the use of the org.matrix namespace on the unstable values.


SCT Stuff:

MSC checklist

FCP tickyboxes

@hughns hughns changed the title MSCXXXX: M_USER_LIMIT_EXCEEDED error code MSC4335: M_USER_LIMIT_EXCEEDED error code Aug 29, 2025
@turt2live turt2live added proposal A matrix spec change proposal client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Aug 29, 2025
@hughns hughns requested a review from erikjohnston September 8, 2025 10:45
@hughns hughns marked this pull request as ready for review September 24, 2025 17:07
@ara4n
Copy link
Member

ara4n commented Oct 10, 2025

@mscbot fcp merge

@mscbot
Copy link
Collaborator

mscbot commented Oct 10, 2025

Team member @mscbot has proposed to merge this. The next step is review by the rest of the tagged people:

Concerns:

  • Checklist not complete/started
  • TravisR - Implementation not sufficient - doesn't appear to be tested in practice, or validates that existing clients handle the new error code appropriately

Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for information about what commands tagged team members can give me.

@mscbot mscbot added proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. disposition-merge labels Oct 10, 2025
@tulir
Copy link
Member

tulir commented Oct 10, 2025

MSCs proposed for Final Comment Period (FCP) should meet the requirements outlined in the checklist prior to being accepted into the spec. This checklist is a bit long, but aims to reduce the number of follow-on MSCs after a feature lands.

SCT members: please check off things you check for, and raise a concern against FCP if the checklist is incomplete. If an item doesn't apply, prefer to check it rather than remove it. Unchecking items is encouraged where applicable.

Checklist:

  • Are appropriate implementation(s) specified in the MSC’s PR description?
  • Are all MSCs that this MSC depends on already accepted?
  • For each new endpoint that is introduced:
    • Have authentication requirements been specified?
    • Have rate-limiting requirements been specified?
    • Have guest access requirements been specified?
    • Are error responses specified?
      • Does each error case have a specified errcode (e.g. M_FORBIDDEN) and HTTP status code?
        • If a new errcode is introduced, is it clear that it is new?
  • Will the MSC require a new room version, and if so, has that been made clear?
    • Is the reason for a new room version clearly stated? For example, modifying the set of redacted fields changes how event IDs are calculated, thus requiring a new room version.
  • Are backwards-compatibility concerns appropriately addressed?
  • Are the endpoint conventions honoured?
    • Do HTTP endpoints use_underscores_like_this?
    • Will the endpoint return unbounded data? If so, has pagination been considered?
    • If the endpoint utilises pagination, is it consistent with the appendices?
  • An introduction exists and clearly outlines the problem being solved. Ideally, the first paragraph should be understandable by a non-technical audience.
  • All outstanding threads are resolved
    • All feedback is incorporated into the proposal text itself, either as a fix or noted as an alternative
  • While the exact sections do not need to be present, the details implied by the proposal template are covered. Namely:
    • Introduction
    • Proposal text
    • Potential issues
    • Alternatives
    • Dependencies
  • Stable identifiers are used throughout the proposal, except for the unstable prefix section
    • Unstable prefixes consider the awkward accepted-but-not-merged state
    • Chosen unstable prefixes do not pollute any global namespace (use “org.matrix.mscXXXX”, not “org.matrix”).
  • Changes have applicable Sign Off from all authors/editors/contributors
  • There is a dedicated "Security Considerations" section which detail any possible attacks/vulnerabilities this proposal may introduce, even if this is "None.". See RFC3552 for things to think about, but in particular pay attention to the OWASP Top Ten.

@turt2live
Copy link
Member

@mscbot concern Checklist not complete/started

(any SCT member can resolve this)

@mscbot mscbot added the unresolved-concerns This proposal has at least one outstanding concern label Oct 14, 2025
@turt2live turt2live moved this from Tracking for review to Ready for FCP ticks in Spec Core Team Workflow Oct 14, 2025
@hughns
Copy link
Member Author

hughns commented Oct 29, 2025

I have added an alternative of using server side translations here instead of info_uri, soft_limit and increase_uri.

I think this would actually provide a better UX overall, albeit at the expense of complexity for the homeserver operator and error payload size.

I would welcome input on this.

@anoadragon453 anoadragon453 self-requested a review November 12, 2025 18:17
@turt2live turt2live added implementation-needs-checking The MSC has an implementation, but the SCT has not yet checked it. and removed needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels Nov 18, 2025
@turt2live
Copy link
Member

@mscbot resolve Checklist not complete/started
@mscbot concern TravisR - Implementation not sufficient - doesn't appear to be tested in practice, or validates that existing clients handle the new error code appropriately

@turt2live turt2live added the 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. label Nov 18, 2025
Comment on lines +37 to +40
* `soft_limit` boolean (optional, default `false`) - `true` means that the specific limit encountered can be increased.
Otherwise it is a hard limit that cannot be increased.
* `increase_uri` (required if `soft_limit` is `true`) - an opaque URI where the user can undertake actions to increase
the encountered limit.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just include increase_uri if the limit can be increased, otherwise omit it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean not have the soft_limit flag?


> This homeserver has exceeded one of its resource limits

As such, I think this message would be confusing to users the interim whilst clients updated their implementations and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As such, I think this message would be confusing to users the interim whilst clients updated their implementations and
As such, I think this message would be confusing to users in the interim whilst clients updated their implementations and

Comment on lines +141 to +144
Separate error codes could be introduced for different types
of limits (e.g., `M_STORAGE_LIMIT_EXCEEDED`, `M_ROOM_LIMIT_EXCEEDED`). However, this approach
would require many new error codes and doesn't provide significant benefits over a single code
with descriptive error messages.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also prevents homeservers for implementing new limits without writing an MSC (the next alternative also speaks to this).

However, it would solve the translation problem without the homeserver needing to define every translation.

```json
{
"errcode": "M_USER_LIMIT_EXCEEDED",
"error": "User has exceeded their storage quota of 10GB",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: since clients sometimes show the error to the user, I think

Suggested change
"error": "User has exceeded their storage quota of 10GB",
"error": "You have exceeded your storage quota of 10GB",

would look better. (same below)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. client-server Client-Server API disposition-merge implementation-needs-checking The MSC has an implementation, but the SCT has not yet checked it. kind:maintenance MSC which clarifies/updates existing spec proposal A matrix spec change proposal proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the final comment period. unresolved-concerns This proposal has at least one outstanding concern

Projects

Status: Ready for FCP ticks

Development

Successfully merging this pull request may close these issues.