{"record":{"id":"c853cd74d130db91","repo":"fish2018/pansou","slug":"susu-url","errorCode":null,"errorMessage":"[susu] 按钮URL为空","messagePattern":"\\[susu\\] 按钮URL为空","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/susu/susu.go","lineNumber":476,"sourceCode":"\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}\n\trealURL = strings.TrimSpace(realURL)\n\tparsedURL, err := url.Parse(realURL)\n\tif err != nil || (parsedURL.Scheme != \"http\" && parsedURL.Scheme != \"https\") || parsedURL.Host == \"\" {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 按钮返回无效链接\")\n\t}\n\n\t// 创建链接\n\tlink := model.Link{\n\t\tURL:      realURL,\n\t\tType:     p.determineLinkType(realURL, buttonDetail.Button.Name),\n\t\tPassword: extractPassword(realURL, buttonDetail.Button.Attr.TQ),","sourceCodeStart":458,"sourceCodeEnd":494,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/susu/susu.go#L458-L494","documentation":"Empty-response guard: the susu button-detail API returned a decodable JSON payload whose Button.URL field is empty. The endpoint is up but declined to hand out a link for this post_id/index/i (expired, invalid, or not-yet-generated token).","triggerScenarios":"Thrown at plugin/susu/susu.go:476 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat as a permanent per-button failure: skip this link, don't retry immediately","Refresh the parent post/page to obtain fresh button indices","Check for account/session requirements on the endpoint"],"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"}