darkwood/ia-exception-bundle
Symfony bundle that enriches HTTP 500 error pages with AI-powered exception analysis via Symfony AI. Replaces raw stack traces with clear explanations, likely causes, and fix suggestions. Supports caching and optional async loading to avoid blocking requests.
include_trace: false and sanitize).For Executives: *"This package turns ‘500 Internal Server Error’ into a debugging superpower by embedding AI into our error pages. For every hour saved diagnosing production issues, we either:
For Engineering (Symfony): *"This bundle replaces stack traces with AI-generated explanations for 500 errors, e.g.:
Error:
DatabaseConnectionExceptionAI Analysis:
- Probable Cause: MySQL server down or credentials expired.
- Suggested Fix: Check
.envforDB_PASSWORDor restart the DB service. Implementation:
symfony/ai-bundle and configure OpenAI/Mistral.bundles.php and set darkwood_ia_exception.yaml.For Engineering (Laravel): *"While this bundle is Symfony-native, we can adapt it for Laravel via:
/api/ai/exception, called from Laravel via HTTP.Exception facade, Livewire for async).
Tradeoffs:For Product/Design: *"This could transform error pages from technical jargon to user-friendly explanations, e.g.:
Customer Error: ‘Your order failed’ AI-Generated: ‘Your payment method expired. [Update card] or [try another method].’ Use Cases:
include_trace in production).
Next Steps: A/B test AI vs. generic errors to measure impact on support volume and user trust."*For Security/Compliance: *"This bundle is designed to avoid data leaks:
include_trace and sanitize error messages.How can I help you explore Laravel packages today?