protected function createErrorResponse($code)
    {
        $response = new HTTPResponse('', $code);

        // Show message in dev
        if (!Director::isLive()) {
            $response->setBody($response->getStatusDescription());
        }

        return $response;
    }
protected function createErrorResponse($code)
    {
        $response = new HTTPResponse('', $code);

        // Show message in dev
        if (!Director::isLive()) {
            $response->setBody($response->getStatusDescription());
        }

        return $response;
    }
protected function createErrorResponse ( $ code ) { $ response = new HTTPResponse ( '' , $ code ) ; // Show message in dev if ( ! Director :: isLive ( ) ) { $ response -> setBody ( $ response -> getStatusDescription ( ) ) ; } return $ response ; }
Create a response with the given error code

@param int $code
@return HTTPResponse
Create a response with the given error code