AlistGo/alist · error
res.Status
Error message
res.Status
What it means
CloudreveV4 local-policy chunked upload: the PUT of a chunk via base.HttpClient returned a non-200 HTTP status and res.Status (e.g. '410 Gone') is returned as the error. Same shape as the V3 driver's local upload failure but on the V4 API's credential URLs.
Source
Thrown at drivers/cloudreve_v4/util.go:293
}
req, err := http.NewRequest("POST", uploadUrl+"?chunk="+strconv.Itoa(chunk),
driver.NewLimitedUploadStream(ctx, bytes.NewReader(byteData)))
if err != nil {
return err
}
req = req.WithContext(ctx)
req.ContentLength = byteSize
// req.Header.Set("Content-Length", strconv.Itoa(int(byteSize)))
req.Header.Set("Authorization", fmt.Sprint(credential))
req.Header.Set("User-Agent", d.getUA())
err = func() error {
res, err := base.HttpClient.Do(req)
if err != nil {
return err
}
defer res.Body.Close()
if res.StatusCode != 200 {
return errors.New(res.Status)
}
body, err := io.ReadAll(res.Body)
if err != nil {
return err
}
var up Resp
err = json.Unmarshal(body, &up)
if err != nil {
return err
}
if up.Code != 0 {
return errors.New(up.Msg)
}
return nil
}()
if err == nil {
retryCount = 0
finish += byteSizeView on GitHub (pinned to 843d9dc814)
Solutions
- Restart the upload (fresh session/credentials).
- Reduce chunk size or parallelism so the session finishes before credentials expire.
- Check proxy client_max_body_size / WAF rules on the chunk endpoint.
- Sync system clock (NTS/NTP) on the alist host.
Defensive patterns
Strategy: retry
Try / catch
if err := chunkPut(); err != nil {
if res.Status != "" && isExpiredCredential(err) { // 401/403/410
d.renewUploadSession()
return chunkPut()
}
return err
} Prevention
- Treat chunk credential expiry as expected: recreate sessions and retry once
- Keep uploads moving; avoid long backoffs inside a live session
- Sync clocks and check proxy limits on the chunk route
When it happens
Trigger: upLocal loop: chunk request executed, res.StatusCode != 200. Caused by expired one-shot upload credentials, session invalidated server-side, range/size mismatch, or gateway rejection.
Common situations: Long uploads outliving the credential TTL (especially with backoff retries); Cloudrebve V4 restarted losing upload sessions; proxy body-size limits rejecting large chunks; clock skew invalidating signed URLs.
Related errors
AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15).
Data as JSON: /api/errors/db528d8a32698c96.
Report an issue: GitHub.