chenhg5/cc-connect · error

webex: getMe status %d

Error message

webex: getMe status %d

What it means

The Webex REST call GET /people/me finished (after doWithRetry's retry/backoff logic) but the HTTP status was not 200 OK. This is a final-status guard: the API rejected the request for an application-level reason such as an invalid/expired bot token (401), insufficient scope (403), or a server-side failure (5xx), as opposed to the transport errors handled inside doWithRetry.

Source

Thrown at platform/webex/client.go:124

	secs, err := strconv.Atoi(strings.TrimSpace(v))
	if err != nil || secs < 0 {
		return 0
	}
	d := time.Duration(secs) * time.Second
	if d > maxRetryAfter {
		d = maxRetryAfter
	}
	return d
}

func (c *httpClient) GetMe(ctx context.Context) (*person, error) {
	resp, err := c.doWithRetry(ctx, http.MethodGet, c.base()+"/people/me", nil, "", "webex: getMe")
	if err != nil {
		return nil, err
	}
	defer func() { _ = resp.Body.Close() }()
	if resp.StatusCode != http.StatusOK {
		return nil, fmt.Errorf("webex: getMe status %d", resp.StatusCode)
	}
	var p person
	if err := json.NewDecoder(resp.Body).Decode(&p); err != nil {
		return nil, err
	}
	return &p, nil
}

func (c *httpClient) CreateDevice(ctx context.Context) (*device, error) {
	// The WDM device endpoint requires name + model + localizedModel; omitting
	// model returns HTTP 400 "Missing Model". Verified against the live API.
	payload := []byte(`{"deviceName":"cc-connect","name":"cc-connect","model":"cc-connect","localizedModel":"cc-connect","systemName":"cc-connect","systemVersion":"1.0","deviceType":"DESKTOP"}`)
	resp, err := c.doWithRetry(ctx, http.MethodPost, "https://wdm-a.wbx2.com/wdm/api/v1/devices", payload, "application/json", "webex: createDevice")
	if err != nil {
		return nil, err
	}
	defer func() { _ = resp.Body.Close() }()
	if resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated {

View on GitHub (pinned to 4000b2338a)

Solutions

  1. If status is 401/403, verify the Webex bot access token and required scopes in config.toml and re-issue a new token
  2. If status is 5xx, the caller may retry later; doWithRetry has already exhausted its transient-failure retries
  3. Capture resp.Body content before closing to include the Webex error message in the log for diagnosis
  4. Check the Webex status page for ongoing incidents when the failure persists
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at platform/webex/client.go:124 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06). Data as JSON: /api/errors/435bcac76b87b5d7. Report an issue: GitHub.