Remove generic rescues to let errors bubble up - #10
Merged
Conversation
Removed unnecessary begin-rescue blocks for service retrieval and scaling.
hammady
approved these changes
Jul 28, 2026
Collaborator
Author
|
Version should be bumped. |
hammady
self-requested a review
July 28, 2026 16:33
Removed generic rescue block for network errors in worker.rb.
hammady
requested changes
Jul 29, 2026
hammady
left a comment
Owner
There was a problem hiding this comment.
Please review all Application errors.
hammady
approved these changes
Jul 29, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The generic
rescue => e; raise NetworkErroringet_serviceandscale_outrelabelledevery failure as "Could not find resource", which was misleading.
Removing the rescues lets errors bubble up as themselves and terminate the process, so the
failure is visible.
Each error is then classified as fatal or recoverable, so only the ones worth retrying are.
ConfigurationErroris no longer anApplicationError— previously the runner caught itand retried on every tick, forever. The full breakdown is now documented in the README
under Error handling.
Two other swallows are fixed along the way: the New Relic client turned any failure into a
NaN metric, which compared false against both thresholds and made an outage look like a
healthy steady state; and the Kubernetes read and patch calls, left unhandled by removing
the rescues, are now mapped by status.