mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-22 08:13:11 +01:00
Remove debug infos from 40* error response
This commit is contained in:
parent
3f883e759b
commit
1433e7b550
@ -134,14 +134,14 @@ private function customApiResponse($exception, $debug)
|
||||
|
||||
default:
|
||||
$response['message'] = ($statusCode >= 500) ? 'Whoops, looks like something went wrong' : $exception->getMessage();
|
||||
|
||||
if (env('APP_DEBUG')) {
|
||||
$response['debug'] = $debug;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (env('APP_DEBUG')) {
|
||||
|
||||
$response['debug'] = $debug;
|
||||
}
|
||||
|
||||
return response()->json($response, $statusCode);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user