Fix view lookup after renderText/renderWith (#1961)#1991
Merged
Conversation
Wrap the action $invoke call in try-catch so errors in controller actions are re-thrown directly instead of falling through to the auto-render block (which produces a misleading ViewNotFound error). Add $renderWithAttempted() guard so the auto-render block is skipped when renderWith() was called but failed before completing. The flag is set at the top of renderWith() before any serialization work. Tests verify: renderText in action skips view lookup, renderNothing in action skips view lookup, action errors re-throw with original type, and the renderWithAttempted flag is respected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Wheels Test Matrix
Results for commit c5eee64. |
Contributor
Wheels Test Results 42 files ± 0 3 906 suites ±0 25m 21s ⏱️ -15s For more details on these errors, see this check. Results for commit 05e08f6. ± Comparison against base commit e57ecf8. |
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
$invokecall in$callActionwith try-catch so action errors re-throw with their original type instead of falling through to the auto-render block and producing a misleadingViewNotFounderror$renderWithAttempted()guard:renderWith()now sets a flag at entry so the auto-render block is skipped even ifrenderWith()fails mid-execution (before reachingrenderText())renderTextskips view lookup,renderNothingskips view lookup, action errors preserve original type, andrenderWithAttemptedflag is respectedTest plan
renderText("hello")in an action does NOT trigger view file lookuprenderNothing()in an action does NOT trigger view file lookupWheels.ViewNotFound)renderWith()failure does not fall through to auto-render blockCloses #1961
🤖 Generated with Claude Code