public function process(Request $request, DelegateInterface $frame)
    {
        try {
            // Try returning the response normally
            return $frame->next($request);
        } catch (OAuthServerException $e) {
            // Generate an error based on the exception
            return $e->generateHttpResponse(new Response());
        }
    }