11 passport 异常该怎么处理呢?
laravel 11 passport OAuthServerException 各位大佬是怎么处理的呀?
我在 bootstrap/app.php
下面进行处理,貌似无效:
->withExceptions(function (Exceptions $exceptions) {
$exceptions->render(function (\League\OAuth2\Server\Exception\OAuthServerException $e) {
return response()->json([
'code'=>config('httpCode.success.status',200),
'message'=> __($e->getMessage())
]);
});
}
换成\Laravel\Passport\Exceptions\OAuthServerException
也无法处理。
有大佬指点一二吗?
推荐文章: