fix(generic): return error from ControllerFactory instead of calling utilruntime.Must - #752
Open
AruneshDwivedi wants to merge 1 commit into
Open
AruneshDwivedi wants to merge 1 commit into
AruneshDwivedi wants to merge 1 commit into
Conversation
brandond
requested changes
Sep 19, 2026
Member
There was a problem hiding this comment.
- use of Must indicates an execution path where failure is unexpected and cannot be handled normally
- the requested change STILL doesn't return the error, it just uses logrus to print the error with some context - but logrus.Fatalf still causes the process to exit.
- the panic from Must can at least be caught via
recover, unlike theos.Exitthat logrus executes onFatal
in short, the pr doesn't seem to do what you say it does, and seems like it might actually make things worse.
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.
Replace utilruntime.Must call with proper error handling. utilruntime.Must panics on error, making recovery impossible. Return the error from ControllerFactory so callers can handle failures gracefully.