Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Aierrorexplained Bundle Laravel Package

acseo/aierrorexplained-bundle

Symfony dev bundle that enhances the default error page with AI-powered explanations and fix suggestions using OpenAI. Includes caching to avoid repeat calls for the same exception and integrates via a custom runtime error handler and error controller.

View on GitHub
Deep Wiki
Context7

ACSEOAIErrorExplainedBundle

This bundle improove Symfony Official Error page with an AI Suggestion to fix the error.

It relies on OpenAI and its openai-php/client package, and it uses a cache mecanism in order to avoid calling OpenAI multiple times for the same exception.

In order to handle ALL exception, we will need to register a custom Error Handler in the Symfony Kernel. This is something that can be done with your composer.json file (see installation).

Installation

  1. Declare the Custom Error Handler in composer.json
    ...
    "extra": {
        ...
        "runtime": {
            "error_handler": "ACSEO\\AIErrorExplainedBundle\\Runtime\\Internal\\AIErrorHandler"
        }
    }
    ...
  1. Install the bundle using composer
composer require --dev acseo/aierrorexplained-bundle
  1. Enable the bundle in you Symfony project (already done with Flex)

<?php
// config/bundles.php

return [
    ACSEO\AIErrorExplainedBundle\ACSEOAIErrorExplainedBundle::class => ['dev' => true],
  1. Register your OPEN AI key in .env file
# .env
OPENAI_CLIENT_KEY=sk-XXXXXX
  1. Declare a custom Error Controller
# config/packages/framework.yml
when@dev:
    framework:
        error_controller: ACSEO\AIErrorExplainedBundle\Controller\ErrorController::show

And tadaaa 🎉, you are ready to have errors !

What you should see

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
craftcms/url-validator
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony