Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Implement MSC3743 (Standardized error response for unknown endpoints) #14209

Closed
clokep opened this issue Oct 17, 2022 · 2 comments
Closed

Implement MSC3743 (Standardized error response for unknown endpoints) #14209

clokep opened this issue Oct 17, 2022 · 2 comments
Assignees
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Comments

@clokep
Copy link
Member

clokep commented Oct 17, 2022

MSC3743 describes some "standard error responses" that a homeserver is to implement. Synapse is partially compliant, but needs to:

  1. Return a 404 instead of a 400 in some cases.
  2. Return a 404 + JSON body for all /_matrix/ sub-resources (media and key specifically don't return properly now.)
  3. Return a 405 + JSON body for unknown methods on known resources. (Currently an HTML body is returned.)

This is a bit annoying since Synapse has two separate ways to route to resources:

  • Twisted Resource (which contain a map to a set of sub-resources).
  • Custom routing via RestServlet.PATTERNS.
@clokep clokep added S-Minor Blocks non-critical functionality, workarounds exist. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Oct 17, 2022
@clokep clokep self-assigned this Oct 17, 2022
@babolivier babolivier changed the title Implement MSC3743 Implement MSC3743 (Standardized error response for unknown endpoints) Oct 17, 2022
@clokep
Copy link
Member Author

clokep commented Oct 17, 2022

I think to have a reasonable implementation of this we should first turn everything internal in the Synapse code to a RestServlet (essentially, don't import Resource directly anywhere). Not sure how terrible that would be.

@clokep
Copy link
Member Author

clokep commented Feb 17, 2023

Most of this work got done in #14599. They're essentially duplicates.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Blocks non-critical functionality, workarounds exist. T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Projects
None yet
Development

No branches or pull requests

1 participant