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