{"record":{"id":"0c69927c7315481a","repo":"fish2018/pansou","slug":"s-0c6992","errorCode":null,"errorMessage":"链接令牌无效: %s","messagePattern":"链接令牌无效: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/ting77/ting77.go","lineNumber":327,"sourceCode":"\tbody, err := io.ReadAll(io.LimitReader(resp.Body, 512<<10))\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\tif resp.StatusCode != http.StatusOK {\n\t\tif resp.StatusCode == http.StatusTooManyRequests {\n\t\t\treturn \"\", \"\", errRateLimited\n\t\t}\n\t\treturn \"\", \"\", fmt.Errorf(\"令牌接口返回状态码 %d\", resp.StatusCode)\n\t}\n\tvar token tokenResponse\n\tif err := json.Unmarshal(body, &token); err != nil {\n\t\treturn \"\", \"\", fmt.Errorf(\"解析链接令牌失败: %w\", err)\n\t}\n\tif token.Code != 0 || token.Data.Token == \"\" || token.Data.TS == \"\" {\n\t\tif token.Code == http.StatusTooManyRequests {\n\t\t\treturn \"\", \"\", errRateLimited\n\t\t}\n\t\treturn \"\", \"\", fmt.Errorf(\"链接令牌无效: %s\", token.Message)\n\t}\n\treturn token.Data.Token, token.Data.TS, nil\n}\n\nfunc setRequestHeaders(req *http.Request, referer, accept string) {\n\treq.Header.Set(\"User-Agent\", browserUserAgent)\n\treq.Header.Set(\"Accept\", accept)\n\treq.Header.Set(\"Accept-Language\", \"zh-CN,zh;q=0.9,en;q=0.8\")\n\treq.Header.Set(\"Cache-Control\", \"no-cache\")\n\tif referer != \"\" {\n\t\treq.Header.Set(\"Referer\", referer)\n\t}\n}\n\nfunc normalizeSiteCloudType(value string) string {\n\tswitch strings.ToLower(strings.TrimSpace(value)) {\n\tcase \"quark\":\n\t\treturn \"quark\"","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/ting77/ting77.go#L309-L345","documentation":"Semantic guard on the decoded ting77 token payload: HTTP was 200 and JSON parsed, but code != 0 or token/ts fields are empty (a 429-coded body maps to errRateLimited before this). The server explicitly declined to issue a usable link token.","triggerScenarios":"Thrown at plugin/ting77/ting77.go:327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat as server-side refusal: retry later with backoff, not immediately","Log the returned code to map known refusals","Drop the entry if refusals persist"],"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"}