{"record":{"id":"560d79757106560c","repo":"fish2018/pansou","slug":"susu-w-560d79","errorCode":null,"errorMessage":"[susu] 读取按钮详情失败: %w","messagePattern":"\\[susu\\] 读取按钮详情失败: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/susu/susu.go","lineNumber":465,"sourceCode":"\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}\n\n\t// 解析响应\n\tvar buttonDetail buttonDetailResponse\n\tif err := json.Unmarshal(respBody, &buttonDetail); err != nil {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 解析按钮详情失败: %w\", err)\n\t}\n\n\t// 如果URL为空\n\tif buttonDetail.Button.URL == \"\" {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 按钮URL为空\")\n\t}\n\n\t// 解析JWT token获取真实链接\n\trealURL, err := p.decodeJWTURL(buttonDetail.Button.URL)\n\tif err != nil {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 解析JWT失败: %w\", err)\n\t}","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/susu/susu.go#L447-L483","documentation":"Reading the (2MB-capped) susu button-detail response body failed mid-stream after a 200: connection reset, read timeout, or truncation by an intermediary. The status check already passed; only the body transfer broke.","triggerScenarios":"Thrown at plugin/susu/susu.go:465 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the button-detail request","Keep the LimitReader cap to avoid unbounded reads","Check for proxies truncating responses"],"exampleFix":null,"handlingStrategy":"retry","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"}