This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
send 404 as http-status when filter-id is unknown to the server #2380
Merged
richvdh
merged 12 commits into
matrix-org:develop
from
krombel:fix_unknown_filter_response
Oct 10, 2019
Merged
send 404 as http-status when filter-id is unknown to the server #2380
richvdh
merged 12 commits into
matrix-org:develop
from
krombel:fix_unknown_filter_response
Oct 10, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This fixed the weirdness of 400 vs 404 as http status code in the case the filter id is not known by the server. As e.g. matrix-js-sdk expects 404 to catch this situation this leads to unwanted behaviour.
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
respond 404 - No such filter with errorcode "M_NOT_FOUND" instead of 404 - No such row with errorcode "M_UNKNOWN" when filter-id is unknown to the server
@matrixbot test this please |
richvdh
suggested changes
Jul 29, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the changes to the GET api look ok, but I'm unconvinced by the change to /sync
I can't believe it's taken us over 2 years to land this patch. @anoadragon453 are you able to take it on? |
richvdh
reviewed
Jul 29, 2019
I'm fed up with the fact that this trivial PR has been bitrotting for so long, and am going to fix it up and land it. |
Codecov Report
@@ Coverage Diff @@
## develop #2380 +/- ##
==========================================
Coverage ? 63.31%
==========================================
Files ? 331
Lines ? 36433
Branches ? 6018
==========================================
Hits ? 23069
Misses ? 11722
Partials ? 1642 |
richvdh
approved these changes
Oct 10, 2019
babolivier
pushed a commit
that referenced
this pull request
Sep 1, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixed the weirdness of 400 vs 404 as http status code in the case
the filter id is not known by the server.
E.g. matrix-js-sdk expects 404 here to catch this situation.
See the discussion in #matrix-dev:matrix.org