{"record":{"id":"435bcac76b87b5d7","repo":"chenhg5/cc-connect","slug":"webex-getme-status-d","errorCode":null,"errorMessage":"webex: getMe status %d","messagePattern":"webex: getMe status (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/webex/client.go","lineNumber":124,"sourceCode":"\tsecs, err := strconv.Atoi(strings.TrimSpace(v))\n\tif err != nil || secs < 0 {\n\t\treturn 0\n\t}\n\td := time.Duration(secs) * time.Second\n\tif d > maxRetryAfter {\n\t\td = maxRetryAfter\n\t}\n\treturn d\n}\n\nfunc (c *httpClient) GetMe(ctx context.Context) (*person, error) {\n\tresp, err := c.doWithRetry(ctx, http.MethodGet, c.base()+\"/people/me\", nil, \"\", \"webex: getMe\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() { _ = resp.Body.Close() }()\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"webex: getMe status %d\", resp.StatusCode)\n\t}\n\tvar p person\n\tif err := json.NewDecoder(resp.Body).Decode(&p); err != nil {\n\t\treturn nil, err\n\t}\n\treturn &p, nil\n}\n\nfunc (c *httpClient) CreateDevice(ctx context.Context) (*device, error) {\n\t// The WDM device endpoint requires name + model + localizedModel; omitting\n\t// model returns HTTP 400 \"Missing Model\". Verified against the live API.\n\tpayload := []byte(`{\"deviceName\":\"cc-connect\",\"name\":\"cc-connect\",\"model\":\"cc-connect\",\"localizedModel\":\"cc-connect\",\"systemName\":\"cc-connect\",\"systemVersion\":\"1.0\",\"deviceType\":\"DESKTOP\"}`)\n\tresp, err := c.doWithRetry(ctx, http.MethodPost, \"https://wdm-a.wbx2.com/wdm/api/v1/devices\", payload, \"application/json\", \"webex: createDevice\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer func() { _ = resp.Body.Close() }()\n\tif resp.StatusCode != http.StatusOK && resp.StatusCode != http.StatusCreated {","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/webex/client.go#L106-L142","documentation":"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.","triggerScenarios":"Thrown at platform/webex/client.go:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["If status is 401/403, verify the Webex bot access token and required scopes in config.toml and re-issue a new token","If status is 5xx, the caller may retry later; doWithRetry has already exhausted its transient-failure retries","Capture resp.Body content before closing to include the Webex error message in the log for diagnosis","Check the Webex status page for ongoing incidents when the failure persists"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}