mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-23 23:49:53 +01:00
Add a new Exception to be gracefully rendered
This commit is contained in:
parent
3aef29717f
commit
350d00902e
@ -53,6 +53,10 @@ public function render($request, Throwable $exception)
|
||||
return response()->json([
|
||||
'message' => str_replace('App\\', '', $exception->getModel()).' not found'], 404);
|
||||
}
|
||||
if ($exception instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException) {
|
||||
return response()->json([
|
||||
'message' => 'not found'], 404);
|
||||
}
|
||||
if ($exception instanceof InvalidOtpParameterException) {
|
||||
return response()->json([
|
||||
'message' => 'invalid OTP parameters',
|
||||
|
Loading…
Reference in New Issue
Block a user