refine preprocess error reporting#474
Merged
NGTmeaty merged 2 commits intointernetarchive:mainfrom Sep 11, 2025
Merged
Conversation
Stop using `panic()` inside the `preprocess()`, return the error in the main `preprocessor()`.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #474 +/- ##
==========================================
- Coverage 56.45% 56.41% -0.05%
==========================================
Files 130 130
Lines 8052 8056 +4
==========================================
- Hits 4546 4545 -1
- Misses 3145 3149 +4
- Partials 361 362 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CorentinB
previously approved these changes
Sep 10, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refines error handling in the preprocessor by converting panic calls to proper error returns within the preprocess() function. The main change replaces several panic() calls with return err statements and adds error handling in the calling function.
- Converts
preprocess()from a void function to one that returns an error - Replaces internal
panic()calls with proper error returns - Adds error handling in the
worker()method that still panics but with better error messaging
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
NGTmeaty
approved these changes
Sep 11, 2025
Collaborator
NGTmeaty
left a comment
There was a problem hiding this comment.
Looks good! Thank you!
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.
Stop using
panic()inside thepreprocess(), return the error in the mainpreprocessor().This is relevant to #473