{"record":{"id":"c90fe0402947527a","repo":"fish2018/pansou","slug":"susu-jwt-w","errorCode":null,"errorMessage":"[susu] 解析JWT失败: %w","messagePattern":"\\[susu\\] 解析JWT失败: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/susu/susu.go","lineNumber":482,"sourceCode":"\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),\n\t}\n\n\t// 缓存结果\n\tbuttonDetailCache.Store(cacheKey, link)\n\n\treturn link, nil","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/susu/susu.go#L464-L500","documentation":"Wrapper around decodeJWTURL: the button URL returned by susu is neither a plain http(s) link nor a decodable JWT of the expected shape (wrong segment count, bad base64, or payload JSON without a usable url).","triggerScenarios":"Thrown at plugin/susu/susu.go:482 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the raw Button.URL value to see the actual token format","Update decodeJWTURL if susu changed its token scheme","Cache decode failures to avoid repeated work"],"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"}