{"record":{"id":"ea93202fd876593c","repo":"AlistGo/alist","slug":"filersp-msg","errorCode":null,"errorMessage":"fileRsp.Msg","messagePattern":"fileRsp\\.Msg","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/chaoxing/driver.go","lineNumber":279,"sourceCode":"\t}\n\treq.Header.Set(\"Content-Type\", writer.FormDataContentType())\n\treq.Header.Set(\"Content-Length\", fmt.Sprintf(\"%d\", body.Len()))\n\tresps, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer resps.Body.Close()\n\tbodys, err := io.ReadAll(resps.Body)\n\tif err != nil {\n\t\treturn err\n\t}\n\tvar fileRsp UploadFileDataRsp\n\terr = json.Unmarshal(bodys, &fileRsp)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif fileRsp.Msg != \"success\" {\n\t\treturn errors.New(fileRsp.Msg)\n\t}\n\tuploadDoneParam := UploadDoneParam{Key: fileRsp.ObjectID, Cataid: \"100000019\", Param: fileRsp.Data}\n\tparams, err := json.Marshal(uploadDoneParam)\n\tif err != nil {\n\t\treturn err\n\t}\n\tquery := map[string]string{\n\t\t\"bbsid\":  d.Addition.Bbsid,\n\t\t\"pid\":    dstDir.GetID(),\n\t\t\"type\":   \"yunpan\",\n\t\t\"params\": url.QueryEscape(\"[\" + string(params) + \"]\"),\n\t}\n\tvar respd ListFileResp\n\t_, err = d.request(\"/pc/resource/addResource\", http.MethodGet, func(req *resty.Request) {\n\t\treq.SetQueryParams(query)\n\t}, &respd)\n\tif err != nil {\n\t\treturn err","sourceCodeStart":261,"sourceCodeEnd":297,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/chaoxing/driver.go#L261-L297","documentation":"Returned by ChaoXing Put after the raw multipart POST to https://pan-yz.chaoxing.com/upload when the parsed UploadFileDataRsp.Msg is anything other than \"success\". The storage server received the bytes but rejected finalizing the object.","triggerScenarios":"The upload server rejects the multipart body (wrong/expired _token or puid form fields, malformed chunk, size/quota exceeded), returning a JSON body whose Msg is an error string.","commonSituations":"Slow upload exceeding the upload-token TTL so the finalize step fails; session rotated between getUploadConfig and the POST; quota exhaustion on the ChaoXing drive.","solutions":["Retry the whole Put operation from scratch so a fresh upload token is fetched","Confirm the ChaoXing account has free quota and the file is under size limits","Re-login the storage if token-related messages recur","Reduce contention: upload sequentially, since tokens are single-use"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"null","typeGuard":null,"tryCatchPattern":"if err := d.Put(ctx, dst, f, up); err != nil {\n    var msg string\n    if errors.As(err, &msg) {}; // err already carries fileRsp.Msg text\n    if strings.Contains(err.Error(), \"token\") || strings.Contains(err.Error(), \"失效\") { retry whole Put once }\n}","preventionTips":["Upload promptly after fetching config (tokens expire)","Retry the full Put, not just the POST, on finalize errors","Monitor quota before large uploads"],"tags":["chaoxing","upload","api-error"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}