File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 10
10
use Froiden \RestAPI \Exceptions \ValidationException ;
11
11
use Illuminate \Database \Eloquent \ModelNotFoundException ;
12
12
use Illuminate \Database \QueryException ;
13
- use Illuminate \Http \Exception \HttpResponseException ;
13
+ use Illuminate \Http \Exceptions \HttpResponseException ;
14
14
use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
15
+ use Throwable ;
15
16
16
17
class ApiExceptionHandler extends Handler
17
18
{
18
19
19
- public function render ($ request , \ Exception $ e )
20
+ public function render ($ request , Throwable $ e )
20
21
{
21
22
$ debug = config ('app.debug ' );
22
23
$ prefix = config ("api.prefix " );
23
24
// Check if prefix is set and use that debug
24
- // This is done to prevent default error message show in otherwise application
25
+ // This is done to prevent default error message show in otherwise application
25
26
// which are not using the api
26
27
if (!$ debug && $ request ->is ($ prefix .'/* ' )) {
27
28
if ($ e instanceof HttpResponseException || $ e instanceof \Illuminate \Validation \ValidationException) {
You can’t perform that action at this time.
0 commit comments