This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Fix exception responding to request that has been closed#10932
Merged
erikjohnston merged 2 commits intorelease-v1.44from Sep 28, 2021
Merged
Fix exception responding to request that has been closed#10932erikjohnston merged 2 commits intorelease-v1.44from
erikjohnston merged 2 commits intorelease-v1.44from
Conversation
babolivier
approved these changes
Sep 28, 2021
babolivier
reviewed
Sep 28, 2021
Comment on lines
+572
to
+574
| else: | ||
| # Start producing if `registerProducer` was successful | ||
| self.resumeProducing() |
Contributor
There was a problem hiding this comment.
Why do this in an else clause rather than in the try one ooc?
Member
Author
There was a problem hiding this comment.
We don't think resumeProducing should throw so we don't want to accidentally swallow exceptions if it does fail. This is especially true since we're catching RuntimeError which is really broad.
erikjohnston
added a commit
that referenced
this pull request
Sep 28, 2021
babolivier
added a commit
that referenced
this pull request
Oct 7, 2021
Looks like the wrong exception type was caught in #10932.
This file contains hidden or 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
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.
Introduced in #10905
It's a bit icky, but a) matches what we do when we call
.finish(), and b) there isn't a more specific exception class really as the problem is that it raises anAttributeError. The alternative is to check ifrequest.channelis still set, but that seems a bit brittlec.f. https://sentry.matrix.org/sentry/synapse-matrixorg/issues/231719/events/b3e541e6016d43f3a584f986d07bc132/