{"record":{"id":"c19a0c561137cf9a","repo":"fish2018/pansou","slug":"eid","errorCode":null,"errorMessage":"获取测试EID失败: 无搜索结果","messagePattern":"获取测试EID失败: 无搜索结果","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/panyq/panyq.go","lineNumber":534,"sourceCode":"\t\t\tif DebugLog {\n\t\t\t\tfmt.Printf(\"panyq: 找到有效的intermediate_action_id: %s\\n\", id)\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\t\n\tif !intermediateIDFound {\n\t\treturn nil, fmt.Errorf(\"未能验证intermediate_action_id\")\n\t}\n\t\n\t// 获取测试EID\n\ttestHits, _, err := p.getSearchResults(testCreds.Sign, 1, p.client) // 获取第一页测试结果\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"获取测试结果失败: %w\", err)\n\t}\n\t\n\tif len(testHits) == 0 {\n\t\treturn nil, fmt.Errorf(\"获取测试EID失败: 无搜索结果\")\n\t}\n\t\n\ttestEID := testHits[0].EID\n\t\n\tif DebugLog {\n\t\tfmt.Printf(\"panyq: 获取到测试EID: %s\\n\", testEID)\n\t}\n\t\n\t// 从剩余ID中排除已使用的ID\n\tnewRemainingIDs := make([]string, 0, len(remainingIDs)-1)\n\tfor _, id := range remainingIDs {\n\t\tif id != finalIDs[ActionIDKeys[1]] {\n\t\t\tnewRemainingIDs = append(newRemainingIDs, id)\n\t\t}\n\t}\n\tremainingIDs = newRemainingIDs\n\t\n\t// 3. 验证final_link_action_id","sourceCodeStart":516,"sourceCodeEnd":552,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/panyq/panyq.go#L516-L552","documentation":"The test search call succeeded but returned zero hits, so discoverActionIDs cannot extract a test EID (testHits[0].EID would index out of range). The plugin treats an empty first page as a discovery failure.","triggerScenarios":"Running discoverActionIDs when the search endpoint returns HTTP 200 with an empty hit list for the \"test\" keyword — credentials are technically valid but yield no results, so no EID can be captured.","commonSituations":"Upstream changed its result schema so hits are parsed into an empty slice; the site filtered/blocking the test query; the search index returning empty for the probe keyword; region/IP-based empty results.","solutions":["Inspect the raw search response (DebugLog / curl) to confirm the site truly returned no hits vs the parser dropping them.","Try a different, more common test keyword if the empty result is keyword-specific.","Update the result-parsing logic in getSearchResults if the response schema changed.","Re-run discovery later if the site is temporarily serving empty results."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"ids, err := plugin.DiscoverActionIDs()\nif err != nil && strings.Contains(err.Error(), \"获取测试EID失败\") {\n    log.Println(\"test search returned no hits; trying alternate probe keyword\")\n    return discoverWithKeyword(\"common\")\n}","preventionTips":["Use a keyword guaranteed to return hits","Inspect raw response to rule out parser issues","Handle region/IP-dependent empty results","Alert when the index serves empty pages"],"tags":["action-id","discovery","empty-result","upstream"],"backgroundTag":"empty-result-set","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"}