App\Exceptions\OAuthExceptionHandler::invalidRequest PHP Method

invalidRequest() protected method

protected invalidRequest ( League\OAuth2\Server\Exception\OAuthException $e ) : mixed
$e League\OAuth2\Server\Exception\OAuthException
return mixed
    protected function invalidRequest(OAuthException $e)
    {
        if ($e instanceof InvalidRequestException) {
            return Response::make(['errors' => ['status' => '400', 'code' => 'InvalidRequest', 'title' => 'Invalid Request', 'detail' => 'The body does not have the necessary data to process the transaction', 'source' => ['parameter' => $e->parameter]]], 400);
        }
        if ($e instanceof InvalidRefreshException) {
            return Response::make(['errors' => ['status' => '400', 'code' => 'InvalidRefreshToken', 'title' => 'Invalid Refresh Token', 'detail' => 'The refresh token is invalid', 'source' => ['parameter' => $e->parameter]]], 400);
        }
    }