Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish b/w nonexistent and unreachable media #49

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Nov 24, 2023

Fixes #46.

I am assuming that after media retention kicks in, the remote homeserver responds to media requests with 404 M_NOT_FOUND. If so, the content scanner should do the same.

Mypy should pass once #53 lands.

@DMRobertson DMRobertson marked this pull request as ready for review November 24, 2023 15:25
@DMRobertson DMRobertson requested a review from a team as a code owner November 24, 2023 15:25
@@ -17,11 +17,14 @@
class ErrCode(str, Enum):
# An unknown error happened.
UNKNOWN = "M_UNKNOWN"
# No route was found with the path and method provided in the request.
# One of the following:
# - No route was found with the path and method provided in the request.
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW This should return M_UNRECOGNISED for unknown paths/methods (see https://spec.matrix.org/v1.8/client-server-api/#common-error-codes).

Copy link
Contributor

@clokep clokep left a comment

Choose a reason for hiding this comment

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

Seems reasonable.

@DMRobertson DMRobertson merged commit b58b91a into main Nov 27, 2023
4 checks passed
@DMRobertson DMRobertson deleted the dmr/return-codes branch November 27, 2023 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Return Status Codes
3 participants