fix(webmvc): avoid index fallback exception for missing public routes#298
fix(webmvc): avoid index fallback exception for missing public routes#298
Conversation
Return normal 404 behaviour when static resources are missing in backend only runs, by preventing a fallback to a missing index handler for unresolved routes
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🧰 Additional context used📓 Path-based instructions (1)booklore-api/src/**/*.java📄 CodeRabbit inference engine (AGENTS.md)
Files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThe change updates the SPA/static resource fallback logic in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Description
Fixes backend only error handling for unresolved public routes that were falling into static index fallback behaviour, and producing
FileNotFoundException/500 log paths whenapp://-/index.htmlis not present. This occurs becauseWebMvcConfigis expectingindex.htmlto exist all of the time, when it only exists when the frontend is bundled with the backend. As a result, this could cause 500s on local backend only runs.This change makes unresolved requests return normal API/web behavior (404/403 as appropriate) instead of attempting to resolve a missing SPA index resource.
Linked Issue: Fixes #297
Changes
index.htmlSummary by CodeRabbit