AlistGo/alist · error

failed to delete tasks %v: %w

Error message

failed to delete tasks %v: %w

What it means

Error "failed to delete tasks %v: %w" thrown in AlistGo/alist.

Source

Thrown at drivers/thunder/driver.go:659

	}, &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
}

func (xc *XunLeiCommon) CoreLogin(username string, password string) (sessionID string, err error) {
	url := XLUSER_API_BASE_URL + "/xluser.core.login/v3/login"
	var resp CoreLoginResp
	res, err := xc.Common.Request(url, http.MethodPost, func(req *resty.Request) {
		req.SetHeader("User-Agent", "android-ok-http-client/xl-acc-sdk/version-5.0.12.512000")
		req.SetBody(&CoreLoginRequest{
			ProtocolVersion: "301",
			SequenceNo:      "1000012",
			PlatformVersion: "10",
			IsCompressed:    "0",
			Appid:           APPID,
			ClientVersion:   "8.31.0.9726",
			PeerID:          "00000000000000000000000000000000",
			AppName:         "ANDROID-com.xunlei.downloadprovider",

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Inspect the underlying error details in the message, fix the indicated cause (credentials, network, or provider-side failure), and retry.

When it happens

Trigger: Thrown at drivers/thunder/driver.go:659 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/407b8f9db24afd03. Report an issue: GitHub.