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

Improperly falling back to unstable endpoint for room hierarchies #406

Open
swedgwood opened this issue Aug 3, 2023 · 0 comments
Open

Comments

@swedgwood
Copy link
Contributor

swedgwood commented Aug 3, 2023

In federationclient.go / RoomHierarchy, we fall back to the unstable endpoint if the spec endpoint returns 404.

However, the spec states that 404 is a valid response of this endpoint, in the case where a room is unknown or the server is otherwise unable to peek it. But the error that is ultimately returned isn't this 404, but rather another M_UNRECOGNIZED 404 error from the unstable endpoint.

This just obfuscates the original error, making logs harder to interpret - perhaps we should not just check for 404 on the spec endpoint but also check for M_UNRECOGNIZED before falling back to unstable, and if both the unstable and spec endpoints error, somehow pass on both errors with some information that we re-tried.

Or maybe, since MSC2946 has been spec for quite a while, we just remove the whole fallback to unstable mechanism in the first place?

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

No branches or pull requests

1 participant