-
-
Notifications
You must be signed in to change notification settings - Fork 121
feat(errors): Rework how errors work from the ground up #215
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
Merged
iambriccardo
merged 19 commits into
main
from
riccardobusetti/etl-141-investigate-the-possibility-to-reduce-the-number-of-error
Jul 28, 2025
Merged
feat(errors): Rework how errors work from the ground up #215
iambriccardo
merged 19 commits into
main
from
riccardobusetti/etl-141-investigate-the-possibility-to-reduce-the-number-of-error
Jul 28, 2025
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
…ibility-to-reduce-the-number-of-error
iambriccardo
commented
Jul 25, 2025
iambriccardo
commented
Jul 25, 2025
imor
reviewed
Jul 28, 2025
Contributor
imor
left a comment
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.
Overall looks good apart from a debuggability concern due to some errors we are suppressing.
imor
approved these changes
Jul 28, 2025
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.
This PR reworks error handling in the
etlcrate to make it more library-like. Instead of defining many error types for each module, we now have a single main error type, and we group related errors usingErrorKind, which allows us to statically identify the error category without needing to examine the error in detail.With this mechanism, we are able to write much cleaner code, with less detailed error information, but still accurate enough to define custom strategies for failure retry policies. This work, specifically, will happen after this PR is merged, as we needed a foundational redesign of the error system before addressing more complex error recovery and handling.
In addition to the new error system, this PR includes:
ReactiveFutureinitialization method name towrap.Currently, the number of
ErrorKindvariants is based on what we expect to distinguish when handling errors. This is expected to evolve, as we may need to handle more specific groups of errors in the future, requiring additionalErrorKindvariants. However, I did not attempt to define the ideal set of variants in this PR, as it’s not feasible to identify all possibilities without using them in real-world error handling. For now, the system simply propagates errors through.