AlistGo/alist · error
sign direct link failed
Error message
sign direct link failed: %w
What it means
Wraps SignURL failure in Open123.Link when a private key is configured: the direct-link URL could not be signed (malformed URL or signing crypto error), so the unsigned raw URL is unusable and Link aborts.
Solutions
- Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at drivers/123_open/read.go:88 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/ef7f3b494a1d04b9.
Report an issue: GitHub.
Appendix: source
Thrown at drivers/123_open/read.go:88
}
if err != nil {
return nil, fmt.Errorf("get link of %s failed: %w", file.GetName(), err)
}
if rawURL == "" {
return nil, errors.New("the server returned an empty download url")
}
if d.PrivateKey != "" {
if d.UID == 0 {
return nil, errors.New("uid is required when private_key is set")
}
validDuration := time.Duration(d.ValidDuration) * time.Minute
if validDuration <= 0 {
validDuration = 30 * time.Minute
}
rawURL, err = SignURL(rawURL, d.PrivateKey, d.UID, validDuration)
if err != nil {
return nil, fmt.Errorf("sign direct link failed: %w", err)
}
}
return &model.Link{URL: rawURL}, nil
}
View on GitHub (pinned to 843d9dc814)