{"record":{"id":"0665b481fd7d68cc","repo":"fish2018/pansou","slug":"susu-w-0665b4","errorCode":null,"errorMessage":"[susu] 创建按钮详情请求失败: %w","messagePattern":"\\[susu\\] 创建按钮详情请求失败: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/susu/susu.go","lineNumber":448,"sourceCode":"\tcacheKey := fmt.Sprintf(\"%s:%d:%d\", postID, index, i)\n\n\t// 检查缓存\n\tif cachedLink, ok := buttonDetailCache.Load(cacheKey); ok {\n\t\treturn cachedLink.(model.Link), nil\n\t}\n\n\tform := url.Values{\n\t\t\"post_id\": {postID},\n\t\t\"index\":   {fmt.Sprintf(\"%d\", index)},\n\t\t\"i\":       {fmt.Sprintf(\"%d\", i)},\n\t\t\"guest\":   {\"\"},\n\t}\n\tctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)\n\tdefer cancel()\n\n\treq, err := http.NewRequestWithContext(ctx, http.MethodPost, ButtonDetailURL, strings.NewReader(form.Encode()))\n\tif err != nil {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 创建按钮详情请求失败: %w\", err)\n\t}\n\tsetAPIHeaders(req, fmt.Sprintf(\"%s/download?post_id=%s&index=%d&i=%d\", BaseURL, postID, index, i))\n\n\t// 发送请求（带重试）\n\tresp, err := p.doRequestWithRetry(client, req, MaxRetries)\n\tif err != nil {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 获取按钮详情失败: %w\", err)\n\t}\n\tdefer resp.Body.Close()\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 按钮详情请求返回状态码: %d\", resp.StatusCode)\n\t}\n\n\t// 读取响应体\n\trespBody, err := io.ReadAll(io.LimitReader(resp.Body, 2<<20))\n\tif err != nil {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 读取按钮详情失败: %w\", err)\n\t}","sourceCodeStart":430,"sourceCodeEnd":466,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/susu/susu.go#L430-L466","documentation":"http.NewRequestWithContext rejected the susu button-detail POST target (ButtonDetailURL) or its body. Fires only on a malformed URL or unreadable reader — the site has not been contacted yet. Input at fault: the configured ButtonDetailURL constant.","triggerScenarios":"Thrown at plugin/susu/susu.go:448 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate ButtonDetailURL at init","This is a programming/config bug, not a runtime condition: fix the constant"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}