AlistGo/alist · error
error:%s
Error message
error:%s
What it means
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:'.
Source
Thrown at drivers/chaoxing/driver.go:124
}, nil
}
func (d *ChaoXing) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error {
query := map[string]string{
"bbsid": d.Addition.Bbsid,
"name": dirName,
"pid": parentDir.GetID(),
}
var resp ListFileResp
_, err := d.request("/pc/resource/addResourceFolder", http.MethodGet, func(req *resty.Request) {
req.SetQueryParams(query)
}, &resp)
if err != nil {
return err
}
if resp.Result != 1 {
msg := fmt.Sprintf("error:%s", resp.Msg)
return errors.New(msg)
}
return nil
}
func (d *ChaoXing) Move(ctx context.Context, srcObj, dstDir model.Obj) error {
query := map[string]string{
"bbsid": d.Addition.Bbsid,
"folderIds": srcObj.GetID(),
"targetId": dstDir.GetID(),
}
if !srcObj.IsDir() {
query = map[string]string{
"bbsid": d.Addition.Bbsid,
"recIds": strings.Split(srcObj.GetID(), "$")[0],
"targetId": dstDir.GetID(),
}
}
var resp ListFileRespView on GitHub (pinned to 843d9dc814)
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
Defensive patterns
Strategy: try-catch
Validate before calling
func validBbsid(id string) bool { return strings.TrimSpace(id) != "" } Try / catch
if err := d.MakeDir(ctx, parent, name); err != nil {
if strings.Contains(err.Error(), "error:") { msg := strings.TrimPrefix(err.Error(), "error:"); /* route msg to user */ }
} Prevention
- Validate bbsid before operations
- Re-list parents to confirm pid exists
- Renew sessions on schedule for long-lived storages
When it happens
Trigger: 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.
Common situations: 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.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/65ac446e18ef433f.
Report an issue: GitHub.