{"record":{"id":"af033aa591595a1f","repo":"AlistGo/alist","slug":"wukong-upload-submit-failed-code-d-message-s","errorCode":null,"errorMessage":"wukong upload submit failed: code=%d message=%s","messagePattern":"wukong upload submit failed: code=(.+?) message=(.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/wukong/driver.go","lineNumber":521,"sourceCode":"\t\tbody[\"image_info\"] = map[string]any{\"uri\": storeURI}\n\tdefault:\n\t\tbody[\"general_info\"] = map[string]any{\"key\": storeURI}\n\t}\n\t_, err := d.client.R().\n\t\tSetContext(ctx).\n\t\tSetQueryParams(map[string]string{\n\t\t\t\"aid\":             d.Aid,\n\t\t\t\"device_platform\": \"web\",\n\t\t\t\"language\":        d.Language,\n\t\t}).\n\t\tSetBody(body).\n\t\tSetResult(&resp).\n\t\tPost(\"/netdisk/upload_submit/\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tif resp.Code != 0 {\n\t\treturn fmt.Errorf(\"wukong upload submit failed: code=%d message=%s\", resp.Code, resp.Message)\n\t}\n\treturn nil\n}\n\nfunc extractVideoVid(resp *commitUploadInnerResp) string {\n\tfor _, item := range resp.Result.Results {\n\t\tif item.Vid != \"\" {\n\t\t\treturn item.Vid\n\t\t}\n\t}\n\tif resp.Result.PluginResult != nil {\n\t\tif vid := findStringByKey(resp.Result.PluginResult, \"Vid\"); vid != \"\" {\n\t\t\treturn vid\n\t\t}\n\t\tif vid := findStringByKey(resp.Result.PluginResult, \"vid\"); vid != \"\" {\n\t\t\treturn vid\n\t\t}\n\t}","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/wukong/driver.go#L503-L539","documentation":"Thrown by uploadSubmit after POSTing the completed upload metadata (father_id, file_type, size, md5, StoreURI, Vid) to /netdisk/upload_submit/. The netdisk API returned a non-zero business code, refusing to register the uploaded file in the user's folder tree. Upload bytes already live in TOS/VOD, only the directory entry failed.","triggerScenarios":"father_id pointing at a deleted folder; duplicate submit for the same file (name conflict handling server-side); md5/size metadata inconsistent with what TOS stored; expired Wukong session at submit time.","commonSituations":"User deletes the destination folder during a long upload; retry logic double-submitting; quota exceeded at the final registration step; session expiring mid-upload.","solutions":["Verify the destination folder still exists (List father_id) and retry submit once","If the code indicates duplicate, List the folder to check whether the file actually registered and treat as success","Re-login and re-run uploadSubmit with the already-obtained StoreURI/Vid (no need to re-upload bytes)","Check account quota and clear space if the code indicates storage full"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := d.uploadSubmit(ctx, fatherID, fileName, ext, fileType, size, md5Hex, storeURI, vid); err != nil {\n    if isWukongAuthErr(err) {\n        return fmt.Errorf(\"session expired after upload; bytes stored, submit can be retried: %w\", err)\n    }\n    return err\n}","preventionTips":["Submit promptly after commit while the session is still valid","Treat uploadSubmit as retryable without re-uploading bytes (StoreURI/Vid remain valid)","Pre-check destination folder existence and quota before large uploads"],"tags":["wukong","upload","submit","api-error","cloud-storage","go"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}