{"record":{"id":"c2ff13e6d66509b3","repo":"chenhg5/cc-connect","slug":"dingtalk-create-request-w","errorCode":null,"errorMessage":"dingtalk: create request: %w","messagePattern":"dingtalk: create request: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/dingtalk/dingtalk.go","lineNumber":824,"sourceCode":"\n\tpayload := map[string]any{\n\t\t\"msgtype\": \"text\",\n\t\t\"text\":    map[string]string{\"content\": content},\n\t}\n\tif len(atUsers) > 0 || atAll {\n\t\tpayload[\"at\"] = map[string]any{\n\t\t\t\"atUserIds\": atUsers,\n\t\t\t\"isAtAll\":   atAll,\n\t\t}\n\t}\n\tbody, err := json.Marshal(payload)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"dingtalk: marshal reply: %w\", err)\n\t}\n\n\treq, err := http.NewRequestWithContext(ctx, http.MethodPost, rc.sessionWebhook, bytes.NewReader(body))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"dingtalk: create request: %w\", err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\n\tresp, err := core.HTTPClient.Do(req)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"dingtalk: send reply: %w\", err)\n\t}\n\tdefer func() { _ = resp.Body.Close() }()\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn fmt.Errorf(\"dingtalk: reply returned status %d\", resp.StatusCode)\n\t}\n\treturn nil\n}\n\nfunc (p *Platform) Reply(ctx context.Context, rctx any, content string) error {\n\trc, ok := rctx.(replyContext)\n\tif !ok {","sourceCodeStart":806,"sourceCodeEnd":842,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/dingtalk/dingtalk.go#L806-L842","documentation":"ReplyWithAt could not construct the http.Request posting the at-annotated reply to the session webhook (typically a malformed webhook URL). Wraps http.NewRequestWithContext's error before any network I/O.","triggerScenarios":"Thrown at platform/dingtalk/dingtalk.go:824 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-derive the session webhook by receiving a fresh message","Check the stored sessionWebhook URL for corruption"],"exampleFix":null,"handlingStrategy":"try-catch","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-14T00:17:10.932Z"}