AlistGo/alist · error
failed to get offline list
Error message
failed to get offline list: %w
What it means
The XunLei task-list request failed at the HTTP layer while fetching offline-download tasks, so no task list can be returned; the request error is wrapped.
Solutions
- Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at drivers/thunder/driver.go:644 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/525e32c57189e92b.
Report an issue: GitHub.
Appendix: source
Thrown at drivers/thunder/driver.go:644
/*
获取离线下载任务列表
*/
func (xc *XunLeiCommon) OfflineList(ctx context.Context, nextPageToken string) ([]OfflineTask, error) {
res := make([]OfflineTask, 0)
var resp OfflineListResp
_, err := xc.Request(TASK_API_URL, http.MethodGet, func(req *resty.Request) {
req.SetContext(ctx).
SetQueryParams(map[string]string{
"type": "offline",
"limit": "10000",
"page_token": nextPageToken,
})
}, &resp)
if err != nil {
return nil, fmt.Errorf("failed to get offline list: %w", err)
}
res = append(res, resp.Tasks...)
return res, nil
}
func (xc *XunLeiCommon) DeleteOfflineTasks(ctx context.Context, taskIDs []string, deleteFiles bool) error {
_, err := xc.Request(TASK_API_URL, http.MethodDelete, func(req *resty.Request) {
req.SetContext(ctx).
SetQueryParams(map[string]string{
"task_ids": strings.Join(taskIDs, ","),
"delete_files": strconv.FormatBool(deleteFiles),
})
}, nil)
if err != nil {
return fmt.Errorf("failed to delete tasks %v: %w", taskIDs, err)
}
return nil
}View on GitHub (pinned to 843d9dc814)