Remove debug infos from 40* error response

This commit is contained in:
Bubka 2020-01-27 21:43:34 +01:00
parent 3f883e759b
commit 1433e7b550

View File

@ -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);
}
}