Summary
Replace the HTML ErrorController and error templates with MixerAPI's exception renderer for structured JSON error responses.
What it provides
- All exceptions render as JSON:
{exception, message, url, code}
- Validation errors automatically return HTTP 422 with structured
violations array
- Debug mode includes stack traces
- Event hook (
MixerApi.ExceptionRender.beforeRender) for customization
Configuration
Set 'exceptionRenderer' => MixerApiExceptionRenderer::class in config/app.php Error config. Remove the HTML ErrorController and error templates.
New dependency
mixerapi/exception-render (individual package, not the umbrella)
Summary
Replace the HTML
ErrorControllerand error templates with MixerAPI's exception renderer for structured JSON error responses.What it provides
{exception, message, url, code}violationsarrayMixerApi.ExceptionRender.beforeRender) for customizationConfiguration
Set
'exceptionRenderer' => MixerApiExceptionRenderer::classinconfig/app.phpError config. Remove the HTMLErrorControllerand error templates.New dependency
mixerapi/exception-render(individual package, not the umbrella)