fish2018/pansou · error

[ ] 请求详情失败

Error message

[%s] 请求详情失败: %w

What it means

Wrapper in yulinshufa getDetailResult: doRequestWithRetry on the detail HTTP client exhausted requestMaxRetries for the detail page. Cause is the last transport or non-200 failure; cache lookup already missed before this.

Solutions

  1. Inspect the wrapped cause
  2. Retry the detail fetch later
  3. Drop the item if the detail page is persistently unreachable
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at plugin/yulinshufa/yulinshufa.go:320 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/a0b0f059e6b2a70d. Report an issue: GitHub.

Appendix: source

Thrown at plugin/yulinshufa/yulinshufa.go:320

	if cached, ok := p.loadFromCache(cacheKey); ok {
		p.debugf("详情缓存命中: %s", cacheKey)
		return &cached, nil
	}

	ctx, cancel := context.WithTimeout(context.Background(), detailTimeout)
	defer cancel()

	req, err := http.NewRequestWithContext(ctx, http.MethodGet, item.DetailURL, nil)
	if err != nil {
		return nil, fmt.Errorf("[%s] 创建详情请求失败: %w", p.Name(), err)
	}
	p.decorateCommonHeaders(req)
	req.Header.Set("Referer", baseURL+"/")
	p.debugf("请求详情: %s", item.DetailURL)

	resp, err := p.doRequestWithRetry(p.detailHTTPClient, req, requestMaxRetries)
	if err != nil {
		return nil, fmt.Errorf("[%s] 请求详情失败: %w", p.Name(), err)
	}
	defer resp.Body.Close()

	doc, err := p.buildGBKDocument(resp.Body)
	if err != nil {
		return nil, fmt.Errorf("[%s] 解析详情失败: %w", p.Name(), err)
	}

	result := p.parseDetailDocument(doc, item)
	if result == nil {
		return nil, fmt.Errorf("[%s] 详情解析为空", p.Name())
	}

	p.storeInCache(cacheKey, *result)
	return result, nil
}

// parseDetailDocument 将详情页转为 SearchResult

View on GitHub (pinned to beaa561337)