Skip to content

JSON error rendering via MixerApi/ExceptionRender #13

Description

@jamisonbryant

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions