-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix: Exit on communication failure #429
Merged
+14
−1
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
60d15bb
exit on communication failure
jnumainville 925dcd3
exit on close
jnumainville beb78d5
Merge remote-tracking branch 'origin/main' into catch_on_data
jnumainville 5e2e01b
comments
jnumainville 6dbb793
Merge remote-tracking branch 'origin/main' into catch_on_data
jnumainville File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
We shouldn't be exiting without at least logging why we're exiting here.
Also I don't like doing a
str(e)
comparison, is there any more definitive way of checking the exception type?Include a ticket with steps to reproduce the issue as well so it's clear which scenario is being fixed here. The description in the PR is somewhat vague in the steps.
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.
I have a much better fix now. This is happening after
on_close
from theMessageStream
is called, so I'm now flagging it there. There is still a possibility of throwing if the message stream closes after that check though. Not sure how likely it is. I could add the ugly try catch back (and check against theis_closed
variable) too. As far as I can tell there is no better way to catch and check for the specific exception - the error message itself originates in Java and is just put into a genericRuntimeError
.Now that I've refined this, should we be logging? I know we don't want to hide errors, but this is a case where the component should already be gone and not sending anything and a log would just pollute the console.