AlistGo/alist · error
yunpan async task failed: errno=%d
Error message
yunpan async task failed: errno=%d
What it means
The fallback branch of checkCookieAsyncTask in the yunpan360 driver: an async task polled via /async/query reached terminal status 10 with a non-zero, non-tolerated errno, and the server returned neither errstr nor an Action name, so only the bare errno can be reported.
Source
Thrown at drivers/yunpan360/util.go:836
}
func checkCookieAsyncTask(task CookieAsyncTask, toleratedErrnos map[int]struct{}) (bool, error) {
if task.Status != 10 {
return false, nil
}
if task.Errno == 0 {
return true, nil
}
if _, ok := toleratedErrnos[task.Errno]; ok {
return true, nil
}
if strings.TrimSpace(task.Errstr) != "" {
return true, errors.New(task.Errstr)
}
if strings.TrimSpace(task.Action) != "" {
return true, fmt.Errorf("yunpan async task %s failed: errno=%d", task.Action, task.Errno)
}
return true, fmt.Errorf("yunpan async task failed: errno=%d", task.Errno)
}
func (d *Yunpan360) openMove(ctx context.Context, srcName, dstPath string) error {
signParams := map[string]string{
"src_name": srcName,
"new_name": dstPath,
}
return d.openPOST(ctx, "File.move", signParams, nil, signParams, nil, true)
}
func (d *Yunpan360) openDelete(ctx context.Context, targetPath string) error {
return d.openPOST(ctx, "File.delete", nil, nil, map[string]string{
"fname": targetPath,
}, nil, true)
}
func apiPathForObj(obj model.Obj) string {
if obj.IsDir() {View on GitHub (pinned to 843d9dc814)
Solutions
- Reproduce with logging of the full CookieAsyncQueryResp payload to recover any context the server omitted
- Retry the operation once after refreshing the cookie session
- Verify account state (quota, permissions, target existence) for the operation that created the task
- Map the errno against 360 API docs; escalate or classify the code before tolerating it
Defensive patterns
Strategy: try-catch
Try / catch
// Go: bare errno with no server context — log the raw task record, then surface
if err := d.waitCookieAsyncTask(ctx, taskID); err != nil {
if strings.Contains(err.Error(), "yunpan async task failed: errno=") {
log.Warnf().Err(err).Str("task_id", taskID).Msg("yunpan async task failed without details")
}
return err
} Prevention
- Log full /async/query payloads during incidents to recover context the driver drops
- Refresh the cookie session before large batch operations
- Retry once; bare-errno failures frequently clear on a second attempt
When it happens
Trigger: Same polling path as the action-named variant: any cookie-mode async operation (recycle, batch ops) whose task completes with an error where task.Errstr and task.Action are both empty strings after TrimSpace.
Common situations: Upstream response schema change omitting errstr/action; account-level async job failures (expired session, quota, server error) reported as a bare code; new error codes not yet classified by the driver.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/731d9e25d51229ce.
Report an issue: GitHub.