Retain every error in a pipeline’s next_error chain - #314
Merged
byroot merged 1 commit intoAug 27, 2026
Conversation
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.
Summary
last_errorfor every failed pipeline command, independently of the initial-error assignment.next_errorchain.Reproduction
Against a disposable local Redis, pipeline four nonexistent commands named
audit-unknown-onethroughaudit-unknown-four. Rescue the firstRedisClient::CommandErrorand follownext_error, recording each error's command.Before: only
oneandfourare reachable.After:
one,two,three,fourare reachable in order; the last error's successor is nil. A subsequentPINGsucceeds.In #298's implementation,
first_error ||= last_error = resultstops assigninglast_erroronce the first error exists. Each later error overwrites the first error's successor.Verification
Naming/PredicateMethodoffense onrevalidate; no lint configuration changed.Compatibility and limitations
No intended breaking changes or changes to raised-first-error /
exception: falsebehavior. The documented chain now includes previously lost errors. Other Ruby implementations, the native driver and upstream CI are not yet locally verified for this individual patch. No test files added or modified, per the originating project's policy; the reproduction was run outside the repository.Prepared with Codex assistance; findings and checks above were reproduced locally.