fish2018/pansou · error
qupansou API error
Error message
qupansou API error: %w
What it means
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.
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at plugin/qupansou/qupansou.go:110 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of fish2018/pansou@beaa561337 (2026-09-07).
Data as JSON: /api/errors/08c6af13d018c6a4.
Report an issue: GitHub.
Appendix: source
Thrown at plugin/qupansou/qupansou.go:110
func (p *QuPanSouAsyncPlugin) Search(keyword string, ext map[string]interface{}) ([]model.SearchResult, error) {
result, err := p.SearchWithResult(keyword, ext)
if err != nil {
return nil, err
}
return result.Results, nil
}
// SearchWithResult 执行搜索并返回包含IsFinal标记的结果
func (p *QuPanSouAsyncPlugin) SearchWithResult(keyword string, ext map[string]interface{}) (model.PluginSearchResult, error) {
return p.AsyncSearchWithResult(keyword, p.doSearch, p.MainCacheKey, ext)
}
// doSearch 执行具体的搜索逻辑
func (p *QuPanSouAsyncPlugin) doSearch(client *http.Client, keyword string, ext map[string]interface{}) ([]model.SearchResult, error) {
// 发送API请求
items, err := p.searchAPI(keyword, client)
if err != nil {
return nil, fmt.Errorf("qupansou API error: %w", err)
}
// 转换为标准格式
results := p.convertResults(items)
return results, nil
}
// 缓存响应结构
type cachedResponse struct {
results []model.SearchResult
timestamp time.Time
}
// searchAPI 向API发送请求
func (p *QuPanSouAsyncPlugin) searchAPI(keyword string, client *http.Client) ([]QuPanSouItem, error) {
// 构建请求体
reqBody := map[string]interface{}{View on GitHub (pinned to beaa561337)