AlistGo/alist · error
e.Error.Message
Error message
e.Error.Message
What it means
In Onedrive's Request helper, the error envelope carried a non-empty error.code other than InvalidAuthenticationToken (which triggers a token refresh and retry), so the server's error.message is surfaced. Fires on 4xx API failures such as invalid paths, quota, or permissions.
Solutions
- Check the storage configuration and the provider's service status, fix the indicated cause, and retry the operation.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at drivers/onedrive/util.go:122 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/1caa9e536d588594.
Report an issue: GitHub.
Appendix: source
Thrown at drivers/onedrive/util.go:122
}
if resp != nil {
req.SetResult(resp)
}
var e RespErr
req.SetError(&e)
res, err := req.Execute(method, url)
if err != nil {
return nil, err
}
if e.Error.Code != "" {
if e.Error.Code == "InvalidAuthenticationToken" {
err = d.refreshToken()
if err != nil {
return nil, err
}
return d.Request(url, method, callback, resp)
}
return nil, errors.New(e.Error.Message)
}
return res.Body(), nil
}
func (d *Onedrive) getFiles(path string) ([]File, error) {
var res []File
nextLink := d.GetMetaUrl(false, path) + "/children?$top=1000&$expand=thumbnails($select=medium)&$select=id,name,size,fileSystemInfo,content.downloadUrl,file,parentReference"
for nextLink != "" {
var files Files
_, err := d.Request(nextLink, http.MethodGet, nil, &files)
if err != nil {
return nil, err
}
res = append(res, files.Value...)
nextLink = files.NextLink
}
return res, nil
}View on GitHub (pinned to 843d9dc814)