fish2018/pansou · error

跳转接口返回不支持的链接

Error message

跳转接口返回不支持的链接: %s

What it means

Filter guard in ting77 resolveLink: the redirect target parsed fine but detectLinkType classifies it as 'others' — not a recognized cloud-disk domain. The link is intentionally rejected so unsupported targets don't pollute results; the raw location is included for debugging.

Solutions

  1. Extend detectLinkType's domain list if the target is a legitimate new disk host
  2. Otherwise skip the entry: this is a permanent, by-design rejection
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at plugin/ting77/ting77.go:262 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/6ccd257b8cc3c758. Report an issue: GitHub.

Appendix: source

Thrown at plugin/ting77/ting77.go:262

		if err != nil {
			lastErr = err
			continue
		}
		io.Copy(io.Discard, io.LimitReader(resp.Body, 512<<10))
		resp.Body.Close()
		location := strings.TrimSpace(resp.Header.Get("Location"))
		if resp.StatusCode < 300 || resp.StatusCode >= 400 || location == "" {
			lastErr = fmt.Errorf("跳转接口返回状态码 %d", resp.StatusCode)
			continue
		}
		resolved, err := url.Parse(location)
		if err != nil || resolved.Scheme == "" || resolved.Host == "" {
			lastErr = fmt.Errorf("跳转接口返回无效链接")
			continue
		}
		linkType := detectLinkType(location)
		if linkType == "others" {
			lastErr = fmt.Errorf("跳转接口返回不支持的链接: %s", resolved.Host)
			continue
		}
		link := model.Link{
			Type:      linkType,
			URL:       location,
			Password:  extractPassword(location),
			Datetime:  entry.Datetime,
			WorkTitle: entry.Title,
		}
		p.linkCache.Store(cacheKey, link)
		return link, nil
	}
	return model.Link{}, lastErr
}

func (p *Ting77Plugin) reserveTokenRequest() error {
	p.tokenMu.Lock()
	defer p.tokenMu.Unlock()

View on GitHub (pinned to beaa561337)