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
        );
    }
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
        );
    }
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 ) ; }
Create a 404 response.

@param Request    $request   The http request.

@param \Exception $exception The exception.

@return JsonResponse

@SuppressWarnings(PHPMD.UnusedPrivateMethod)
Create a 404 response .