{"record":{"id":"aae248e1d95b9e0c","repo":"fish2018/pansou","slug":"s-aae248","errorCode":null,"errorMessage":"[%s] 所有搜索任务都失败","messagePattern":"\\[(.+?)\\] 所有搜索任务都失败","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/sdso/sdso.go","lineNumber":207,"sourceCode":"\t\tsuccessTasks++\n\t\tallResults = append(allResults, pageResult.results...)\n\t\tresultsByType[pageResult.fromType] += len(pageResult.results)\n\t\tif DebugLog {\n\t\t\tfmt.Printf(\"[%s] %s网盘第%d页成功获取 %d 个结果\\n\", p.Name(), pageResult.fromType, pageResult.pageNo, len(pageResult.results))\n\t\t}\n\t}\n\n\tif DebugLog {\n\t\tfmt.Printf(\"[%s] 分类搜索完成: 成功%d任务, 失败%d任务, 总结果%d个\\n\", \n\t\t\tp.Name(), successTasks, errorTasks, len(allResults))\n\t\tfor cloudType, count := range resultsByType {\n\t\t\tfmt.Printf(\"[%s]   - %s网盘: %d个结果\\n\", p.Name(), cloudType, count)\n\t\t}\n\t}\n\n\t// 4. 如果所有任务都失败，返回错误\n\tif successTasks == 0 {\n\t\treturn nil, fmt.Errorf(\"[%s] 所有搜索任务都失败\", p.Name())\n\t}\n\n\t// 5. 关键词过滤\n\tbeforeFilterCount := len(allResults)\n\tfilteredResults := plugin.FilterResultsByKeyword(allResults, keyword)\n\t\n\tif DebugLog {\n\t\tfmt.Printf(\"[%s] 关键词过滤: 过滤前%d项 -> 过滤后%d项\\n\", \n\t\t\tp.Name(), beforeFilterCount, len(filteredResults))\n\t}\n\n\treturn filteredResults, nil\n}\n\n// fetchSinglePageWithType 获取指定网盘类型的单页数据\nfunc (p *SDSOPlugin) fetchSinglePageWithType(client *http.Client, keyword string, pageNo int, fromType string) ([]model.SearchResult, error) {\n\t// 1. 构建搜索URL，添加from参数指定网盘类型\n\tsearchURL := fmt.Sprintf(\"https://sdso.top/api/sd/search?name=%s&pageNo=%d&from=%s\", ","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/sdso/sdso.go#L189-L225","documentation":"The SDSO search plugin (searchImpl) fans out concurrent page-fetch tasks across all supported cloud-drive types. This error is returned only when successTasks == 0, i.e. every single page request for every cloud type failed (network errors, non-200 status, JSON parse errors, or API-level errors), so no results could be collected at all.","triggerScenarios":"Calling the plugin's Search (searchImpl) when every underlying fetchSinglePageWithType task fails: sdso.top is unreachable/down, DNS failure, the site blocks the client (4xx/5xx), the API returns non-200 body codes (e.g. rate-limit or captcha), or responses are not valid JSON.","commonSituations":"Running the aggregator in an environment without internet access; sdso.top being temporarily down or having changed its API; the site rate-limiting or anti-bot-blocking the scraper's User-Agent/IP; a corporate proxy/firewall blocking sdso.top.","solutions":["Verify network connectivity to https://sdso.top/api/sd/search from the host (curl the endpoint with a keyword).","Enable the plugin's DebugLog to see the per-task underlying errors (each task's wrapped error is printed).","Check whether sdso.top is rate-limiting or blocking (429/403); reduce concurrency/pages per type or add delays.","Check whether the site changed its API contract (APIResponse shape or URL) and update the plugin accordingly.","As a user, disable the sdso plugin or rely on other plugins, since the aggregator typically continues with other sources."],"exampleFix":"// before\nresults, err := sdsoPlugin.Search(ctx, keyword)\nif err != nil { log.Fatal(err) }\n// after\nresults, err := sdsoPlugin.Search(ctx, keyword)\nif err != nil {\n    log.Printf(\"sdso source unavailable, continuing with other sources: %v\", err)\n    results = nil\n}","handlingStrategy":"try-catch","validationCode":"// Go: probe the source before relying on it\nresp, err := http.Get(\"https://sdso.top/api/sd/search?name=test&pageNo=1&from=baidu\")\nif err != nil { /* sdso unavailable, skip this plugin */ }","typeGuard":null,"tryCatchPattern":"results, err := plugin.Search(ctx, keyword)\nif err != nil {\n    log.Printf(\"sdso source failed (all page tasks): %v\", err)\n    results = nil // continue with other sources\n}","preventionTips":["Treat each plugin/source as optional and aggregate partial results","Monitor sdso.top availability with a health check","Enable DebugLog to capture per-task underlying errors","Throttle per-source request rate to avoid blocks"],"tags":["network","search","upstream","go"],"backgroundTag":"upstream-api-error","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"}