original_string: protected function createXmlHttpResponse(BlockadeException $exception, Request $request)
      {
          if ($exception instanceof AuthenticationException || $exception instanceof CredentialsException) {
              return new Response('Authentication required', Response::HTTP_UNAUTHORIZED);
          }
  
          return new Response('Access denied', Response::HTTP_FORBIDDEN);
      }
code: protected function createXmlHttpResponse(BlockadeException $exception, Request $request)
      {
          if ($exception instanceof AuthenticationException || $exception instanceof CredentialsException) {
              return new Response('Authentication required', Response::HTTP_UNAUTHORIZED);
          }
  
          return new Response('Access denied', Response::HTTP_FORBIDDEN);
      }
code_tokens: protected function createXmlHttpResponse ( BlockadeException $ exception , Request $ request ) { if ( $ exception instanceof AuthenticationException || $ exception instanceof CredentialsException ) { return new Response ( 'Authentication required' , Response :: HTTP_UNAUTHORIZED ) ; } return new Response ( 'Access denied' , Response :: HTTP_FORBIDDEN ) ; }
docstring: Create a response for XmlHttpRequests.
  
  @param BlockadeException $exception The exception
  @param Request           $request   The request that caused the exception
docstring_tokens: Create a response for XmlHttpRequests .