Skip to content

🐛 fix(eval): propagate actual module error instead of always returning NotFound#1232

Merged
harehare merged 1 commit intomainfrom
fix/module-error
Feb 7, 2026
Merged

🐛 fix(eval): propagate actual module error instead of always returning NotFound#1232
harehare merged 1 commit intomainfrom
fix/module-error

Conversation

@harehare
Copy link
Copy Markdown
Owner

@harehare harehare commented Feb 7, 2026

Refactor module import error handling from if-let chain to match expression, which properly propagates the original ModuleError variant (e.g., IOError) instead of converting all non-AlreadyLoaded errors to NotFound.

…g NotFound

Refactor module import error handling from if-let chain to match expression,
which properly propagates the original ModuleError variant (e.g., IOError)
instead of converting all non-AlreadyLoaded errors to NotFound.
Copilot AI review requested due to automatic review settings February 7, 2026 11:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors module import error handling in the evaluator to preserve and propagate the original ModuleError variants (e.g., IOError) instead of collapsing most failures into NotFound.

Changes:

  • Replaced an if let/else if chain with a match to handle module load results more explicitly.
  • Propagated non-AlreadyLoaded module load errors directly as RuntimeError::ModuleLoadError.
  • Updated a unit test expectation to assert IOError instead of NotFound.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 7, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing fix/module-error (152202e) with main (5479ab8)

Summary

✅ 29 untouched benchmarks

@harehare harehare merged commit 0ef7dd1 into main Feb 7, 2026
7 checks passed
@harehare harehare deleted the fix/module-error branch February 7, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants