EDM-2403: Handle initialization errors gracefully instead of panic#370
Conversation
87ab466 to
758bdae
Compare
WalkthroughPanicking behavior replaced with structured error logging and graceful process termination across proxy initialization and request handling. Three error paths in proxy/app.go (TLS configuration, authentication initialization, TLS certificate loading) and one in proxy/bridge/handler.go (URL parsing) now log errors and exit with status 1 instead of panicking. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (1)proxy/bridge/handler.go (1)
⏰ 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 comments (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Substitute all cases in which the UI was panicking by gracefully logging the error and exiting the main process.
Logs example when
FLIGHTCTL_SERVERis an invalid URL:Before:
After:
Summary by CodeRabbit