private function createHttpExceptionResponse(HttpException $exception)
    {
        return new JsonResponse(
            [
                'status'  => 'ERROR',
                'message' => $exception->getMessage()
            ],
            $exception->getStatusCode(),
            $exception->getHeaders()
        );
    }
private function createHttpExceptionResponse(HttpException $exception)
    {
        return new JsonResponse(
            [
                'status'  => 'ERROR',
                'message' => $exception->getMessage()
            ],
            $exception->getStatusCode(),
            $exception->getHeaders()
        );
    }
private function createHttpExceptionResponse ( HttpException $ exception ) { return new JsonResponse ( [ 'status' => 'ERROR' , 'message' => $ exception -> getMessage ( ) ] , $ exception -> getStatusCode ( ) , $ exception -> getHeaders ( ) ) ; }
Create a http response.

@param HttpException $exception The exception to create a response for.

@return JsonResponse
Create a http response .