{"record":{"id":"65ac446e18ef433f","repo":"AlistGo/alist","slug":"error-s","errorCode":null,"errorMessage":"error:%s","messagePattern":"error:(.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/chaoxing/driver.go","lineNumber":124,"sourceCode":"\t}, nil\n}\n\nfunc (d *ChaoXing) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error {\n\tquery := map[string]string{\n\t\t\"bbsid\": d.Addition.Bbsid,\n\t\t\"name\":  dirName,\n\t\t\"pid\":   parentDir.GetID(),\n\t}\n\tvar resp ListFileResp\n\t_, err := d.request(\"/pc/resource/addResourceFolder\", http.MethodGet, func(req *resty.Request) {\n\t\treq.SetQueryParams(query)\n\t}, &resp)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif resp.Result != 1 {\n\t\tmsg := fmt.Sprintf(\"error:%s\", resp.Msg)\n\t\treturn errors.New(msg)\n\t}\n\treturn nil\n}\n\nfunc (d *ChaoXing) Move(ctx context.Context, srcObj, dstDir model.Obj) error {\n\tquery := map[string]string{\n\t\t\"bbsid\":     d.Addition.Bbsid,\n\t\t\"folderIds\": srcObj.GetID(),\n\t\t\"targetId\":  dstDir.GetID(),\n\t}\n\tif !srcObj.IsDir() {\n\t\tquery = map[string]string{\n\t\t\t\"bbsid\":    d.Addition.Bbsid,\n\t\t\t\"recIds\":   strings.Split(srcObj.GetID(), \"$\")[0],\n\t\t\t\"targetId\": dstDir.GetID(),\n\t\t}\n\t}\n\tvar resp ListFileResp","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/chaoxing/driver.go#L106-L142","documentation":"Returned by ChaoXing MakeDir when the /pc/resource/addResourceFolder endpoint answers with resp.Result != 1, i.e. the folder creation was refused. The server-provided resp.Msg is embedded after 'error:'.","triggerScenarios":"Creating a directory with an invalid bbsid, a parent pid that does not exist or is not writable, a duplicate folder name, or when the session cookies expired without triggering the transport-level error path.","commonSituations":"Wrong bbsid (course/drive id) in storage addition; target parent folder deleted in another session; account session invalidated so business calls fail with a message.","solutions":["Verify the bbsid in the storage config matches the cloud drive you see in the web UI","Re-login / refresh the storage so cookies are renewed, then retry folder creation","Check the resp.Msg text for the concrete reason (duplicate name, permission, etc.) and address it","If the parent folder was deleted, list the directory to refresh IDs and retry"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"func validBbsid(id string) bool { return strings.TrimSpace(id) != \"\" }","typeGuard":null,"tryCatchPattern":"if err := d.MakeDir(ctx, parent, name); err != nil {\n    if strings.Contains(err.Error(), \"error:\") { msg := strings.TrimPrefix(err.Error(), \"error:\"); /* route msg to user */ }\n}","preventionTips":["Validate bbsid before operations","Re-list parents to confirm pid exists","Renew sessions on schedule for long-lived storages"],"tags":["chaoxing","mkdir","api-error"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}