original_string: private function createNotFoundResponse($request, $exception)
      {
          $message = $exception->getMessage();
          if (empty($message)) {
              $message = 'Uri ' . $request->getRequestUri() . ' could not be found';
          }
  
          return new JsonResponse(
              [
                  'status'  => 'ERROR',
                  'message' => $message
              ],
              JsonResponse::HTTP_NOT_FOUND
          );
      }
code: private function createNotFoundResponse($request, $exception)
      {
          $message = $exception->getMessage();
          if (empty($message)) {
              $message = 'Uri ' . $request->getRequestUri() . ' could not be found';
          }
  
          return new JsonResponse(
              [
                  'status'  => 'ERROR',
                  'message' => $message
              ],
              JsonResponse::HTTP_NOT_FOUND
          );
      }
code_tokens: private function createNotFoundResponse ( $ request , $ exception ) { $ message = $ exception -> getMessage ( ) ; if ( empty ( $ message ) ) { $ message = 'Uri ' . $ request -> getRequestUri ( ) . ' could not be found' ; } return new JsonResponse ( [ 'status' => 'ERROR' , 'message' => $ message ] , JsonResponse :: HTTP_NOT_FOUND ) ; }
docstring: Create a 404 response.
  
  @param Request    $request   The http request.
  
  @param \Exception $exception The exception.
  
  @return JsonResponse
  
  @SuppressWarnings(PHPMD.UnusedPrivateMethod)
docstring_tokens: Create a 404 response .