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

Return JSON error responses for unknown routes/methods. #55

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

clokep
Copy link
Contributor

@clokep clokep commented Nov 29, 2023

I tested this with:

$ curl -v http://localhost:8080/_matrix/client/foo
$ curl -v http://localhost:8080/_matrix/media_proxy/unstable/foo
$ curl -v -X DELETE http://localhost:8080/_matrix/media_proxy/unstable/download/foo/bar

Fixes #43

Copy link
Contributor

@DMRobertson DMRobertson left a comment

Choose a reason for hiding this comment

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

Seems fine to me. Would be nice to write up your curl testing as automated tests, but I won't block this on that.

@clokep
Copy link
Contributor Author

clokep commented Nov 29, 2023

Seems fine to me. Would be nice to write up your curl testing as automated tests, but I won't block this on that.

I couldn't see anything that tests things at the REST layer, unfortunate, so I'm not really sure how to do that.

@clokep clokep merged commit 2151f88 into main Nov 29, 2023
4 checks passed
@clokep clokep deleted the clokep/errcodes branch November 29, 2023 16:14
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.

Return correct unknown path/method response
2 participants