Services_Hoptoad::handleErrorResponse PHP Method

handleErrorResponse() protected method

protected handleErrorResponse ( mixed $code ) : void
$code mixed The HTTP status code from Hoptoad.
return void
    protected function handleErrorResponse($code)
    {
        switch ($code) {
            case '403':
                $msg = 'The requested project does not support SSL - resubmit in an http request.';
                break;
            case '422':
                $msg = 'The submitted notice was invalid - check the notice xml against the schema.';
                break;
            case '500':
                $msg = 'Unexpected errors - submit a bug report at http://help.hoptoadapp.com.';
                break;
            default:
                $msg = 'Unknown error code from Hoptoad\'s API: ' . $code;
                break;
        }
        throw new RuntimeException($msg, $code);
    }