juicedata/juicefs · error
${errMsg}
Error message
${errMsg} What it means
ufile.ListUploads surfaces UFile's own API error text: when the ListMultipartUploads response carries a non-zero RetCode, the value of ErrMsg is returned as the error (the ${errMsg} placeholder). It is a pass-through of a server-side UFile error.
Source
Thrown at pkg/object/ufile.go:354
}
func (u *ufile) ListUploads(ctx context.Context, marker string) ([]*PendingPart, string, error) {
query := url.Values{}
query.Add("muploadid", "")
query.Add("prefix", "")
query.Add("marker", marker)
query.Add("limit", strconv.Itoa(1000))
resp, err := u.request(ctx, "GET", "?"+query.Encode(), nil, nil)
if err != nil {
return nil, "", err
}
var out ufileListMultipartUploadsResult
// FIXME: invalid auth
if err := u.parseResp(resp, &out); err != nil {
return nil, "", err
}
if out.RetCode != 0 {
return nil, "", errors.New(out.ErrMsg)
}
parts := make([]*PendingPart, len(out.DataSet))
for i, u := range out.DataSet {
parts[i] = &PendingPart{u.FileName, u.UploadId, time.Unix(int64(u.StartTime), 0)}
}
return parts, out.NextMarker, nil
}
func newUFile(endpoint, accessKey, secretKey, token string) (ObjectStorage, error) {
if !strings.Contains(endpoint, "://") {
endpoint = fmt.Sprintf("https://%s", endpoint)
}
return &ufile{RestfulStorage{DefaultObjectStorage{}, endpoint, accessKey, secretKey, "UCloud", ufileSigner}}, nil
}
func init() {
Register("ufile", newUFile)
}View on GitHub (pinned to c9a67b23e8)
Solutions
- Check UCloud public/private keys and bucket/region configuration
- Read the returned ErrMsg text — it names the actual UFile API problem (e.g. authorization failure)
- Re-sign/re-authenticate if credentials were rotated
- Retry later if ErrMsg indicates a server-side issue
Defensive patterns
Strategy: try-catch
Validate before calling
// verify credentials/bucket up front
if ufileAccessKey == "" || ufileBucket == "" {
return fmt.Errorf("missing UFile credentials or bucket")
} Try / catch
parts, marker, err := store.ListUploads(ctx)
if err != nil {
// ErrMsg from UFile is in err — log and check auth/bucket config
logger.Errorf("list uploads: %v", err)
} Prevention
- Keep UCloud API keys valid and rotated before expiry
- Confirm bucket name and region match between config and console
- Log the full ErrMsg to identify the specific UFile RetCode
When it happens
Trigger: Calling ListUploads when the UFile API rejects the request — invalid auth/signature, wrong bucket, or any UFile-specific RetCode != 0.
Common situations: Expired or wrong UCloud API credentials; listing uploads on a bucket the account cannot access; UFile service-side errors returned inside a 200 response.
Related errors
- status: %v, message: %s
- No ETag
- found invalid key %s from List, prefix: %s, marker: %s
- UploadPart: %s
- CompleteMultipart: %s
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/e1e8ca2e2d1ff534.
Report an issue: GitHub.