{"record":{"id":"03195cbfb5d85cc4","repo":"chenhg5/cc-connect","slug":"webex-getme-w","errorCode":null,"errorMessage":"webex: getMe: %w","messagePattern":"webex: getMe: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/webex/webex.go","lineNumber":211,"sourceCode":"\tstableConnWindow = 10 * time.Second\n)\n\n// Start fetches the bot identity, registers a device, and launches the\n// reconnecting WebSocket read loop in the background.\nfunc (p *Platform) Start(handler core.MessageHandler) error {\n\tp.mu.Lock()\n\tif p.stopping {\n\t\tp.mu.Unlock()\n\t\treturn fmt.Errorf(\"webex: platform stopped\")\n\t}\n\tp.handler = handler\n\tctx, cancel := context.WithCancel(context.Background())\n\tp.cancel = cancel\n\tp.mu.Unlock()\n\n\tme, err := p.client.GetMe(ctx)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"webex: getMe: %w\", err)\n\t}\n\tp.mu.Lock()\n\tp.selfID = me.ID\n\tif len(me.Emails) > 0 {\n\t\tp.selfEmail = me.Emails[0]\n\t}\n\tp.mu.Unlock()\n\tslog.Info(\"webex: authenticated\", \"bot\", me.DisplayName)\n\n\tgo p.connectLoop(ctx)\n\treturn nil\n}\n\n// Stop cancels the read loop and deletes the registered device.\nfunc (p *Platform) Stop() error {\n\tp.mu.Lock()\n\tp.stopping = true\n\tcancel := p.cancel","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/webex/webex.go#L193-L229","documentation":"Start first fetches the bot's own identity via GET /people/me. Any client error (auth failure, network problem, API error) is wrapped as 'webex: getMe: %w'. This usually means authentication or connectivity to Webex failed before the platform could start.","triggerScenarios":"GetMe returns non-2xx (401 invalid token, 403) or a network error occurs (DNS, TLS, proxy) during Start.","commonSituations":"Wrong or revoked bot token; corporate proxy blocking api.webex.com; Webex outage; DNS failure in restricted network environments.","solutions":["Validate the bot token with curl -H \"Authorization: Bearer $TOKEN\" https://webexapis.com/v1/people/me","Check network/proxy configuration so the host can reach webexapis.com over TLS","Regenerate the token if it was revoked or belongs to a deleted bot","Inspect the wrapped cause (%w) for the underlying status or transport error"],"exampleFix":"// before\ntoken := \"old-token\"\n// after\n// verify first:\n// curl -H \"Authorization: Bearer $TOKEN\" https://webexapis.com/v1/people/me\n// then regenerate from developer.webex.com if it returns 401","handlingStrategy":"retry","validationCode":"// pre-flight: curl -f -H \"Authorization: Bearer $TOKEN\" https://webexapis.com/v1/people/me","typeGuard":null,"tryCatchPattern":"if err := p.Start(handler); err != nil {\n    var apiErr *webex.APIError\n    if errors.As(err, &apiErr) && apiErr.StatusCode == 401 { regenerateTokenAndRestart() }\n    return err\n}","preventionTips":["Validate the bot token at deployment time with a /people/me smoke test","Monitor egress to webexapis.com from the host","Wrap Start with retry+backoff for transient network errors","Unwrap the error chain to distinguish 401 from network failures"],"tags":["webex","authentication","api","startup"],"backgroundTag":"authentication-required","analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}