private function handleCurlError($errno, $message)
    {
        $apiBase = $this->apiBase;
        switch ($errno) {
            case CURLE_COULDNT_CONNECT:
            case CURLE_COULDNT_RESOLVE_HOST:
            case CURLE_OPERATION_TIMEOUTED:
                $msg = 'Could not connect to MyAllocator (' . $apiBase . '). '
                     . 'Please check your internet connection and try again.';
                break;
            default:
                $msg = 'Unexpected error communicating with MyAllocator. '
                     . 'If this problem persists,  let us know at '
                     . 'support@myallocator.com.';
        }

        $msg .= "\n\n(Network error [errno $errno]: $message)";
        throw new ApiConnectionException($msg, $this->state);
    }