{"record":{"id":"08c6af13d018c6a4","repo":"fish2018/pansou","slug":"qupansou-api-error-w","errorCode":null,"errorMessage":"qupansou API error: %w","messagePattern":"qupansou API error: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/qupansou/qupansou.go","lineNumber":110,"sourceCode":"func (p *QuPanSouAsyncPlugin) Search(keyword string, ext map[string]interface{}) ([]model.SearchResult, error) {\n\tresult, err := p.SearchWithResult(keyword, ext)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn result.Results, nil\n}\n\n// SearchWithResult 执行搜索并返回包含IsFinal标记的结果\nfunc (p *QuPanSouAsyncPlugin) SearchWithResult(keyword string, ext map[string]interface{}) (model.PluginSearchResult, error) {\n\treturn p.AsyncSearchWithResult(keyword, p.doSearch, p.MainCacheKey, ext)\n}\n\n// doSearch 执行具体的搜索逻辑\nfunc (p *QuPanSouAsyncPlugin) doSearch(client *http.Client, keyword string, ext map[string]interface{}) ([]model.SearchResult, error) {\n\t// 发送API请求\n\titems, err := p.searchAPI(keyword, client)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"qupansou API error: %w\", err)\n\t}\n\t\n\t// 转换为标准格式\n\tresults := p.convertResults(items)\n\t\n\treturn results, nil\n}\n\n// 缓存响应结构\ntype cachedResponse struct {\n\tresults   []model.SearchResult\n\ttimestamp time.Time\n}\n\n// searchAPI 向API发送请求\nfunc (p *QuPanSouAsyncPlugin) searchAPI(keyword string, client *http.Client) ([]QuPanSouItem, error) {\n\t// 构建请求体\n\treqBody := map[string]interface{}{","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/qupansou/qupansou.go#L92-L128","documentation":"Generic wrapper used inside qupansou doSearch for any failure of its request pipeline; the %w cause identifies the actual stage (marshal, request build, transport, read, decode, or API status error). This message itself adds no new failure condition.","triggerScenarios":"Thrown at plugin/qupansou/qupansou.go:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Unwrap the cause with errors.Unwrap/is to find the failing stage","Fix the underlying stage (network, payload, or API status)","Propagate the cause verbatim instead of double-wrapping"],"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"}