kaninstein / laravel-app-errors
Consistent API error contract (HTTP semantic) with request_id and environment-aware debug payloads for Laravel.
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/kaninstein/laravel-app-errors
Requires
- php: ^8.2
- illuminate/http: ^12.0
- illuminate/support: ^12.0
README
Consistent JSON error contract for Laravel APIs with:
- Semantic HTTP statuses (422/401/403/404/409/412/503/500)
request_idpropagation via middleware (X-Request-Id)- Environment-aware
debugpayloads
Install
composer require kaninstein/laravel-app-errors
Usage
Publish config:
php artisan vendor:publish --tag=app-errors-config
Add Kaninstein\LaravelAppErrors\Http\Middleware\RequestIdMiddleware to your API/web middleware stack and render JSON errors using Kaninstein\LaravelAppErrors\Http\ExceptionMapper.