-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
I'm using repositories to share logic between the API and the application, when I query for a model and it doesn't exist it uses findOrFail which throws a Illuminate\Database\Eloquent\ModelNotFoundException. The problem is, at its core this extension extends the core's RuntimeException instead of a Symfony HTTP Exception so it's not caught by the API's exception handler. How would I go about to catch it globally without wrapping every single one of my methods in a try catch ?
I saw an API::error method but I'm unsure as to how it's meant to be used, would that be it ?
Metadata
Metadata
Assignees
Labels
No labels