AlistGo/alist · error · ErrResp

ErrorCode: %d ,Error: %s ,ServerRunTime: %f ,ServerName: %s

Error message

ErrorCode: %d ,Error: %s ,ServerRunTime: %f ,ServerName: %s

What it means

This is the default branch of the FebBox request handler: the API responded with an ErrorCode other than 0, 1, or -10001, so the driver wraps the server's own error payload (code, message, runtime, server name) into a Go error. It is the generic pass-through for every FebBox API failure that is not a success or a recoverable token expiry.

Source

Thrown at drivers/febbox/util.go:64

	}

	switch e.ErrorCode {
	case 0:
		return res.Body(), nil
	case 1:
		return res.Body(), nil
	case -10001:
		if e.ServerName != "" {
			// access_token 过期
			if err = d.refreshTokenByOAuth2(); err != nil {
				return nil, err
			}
			return d.request(url, method, callback, resp)
		} else {
			return nil, errors.New(e.Error())
		}
	default:
		return nil, errors.New(e.Error())
	}
}

func (d *FebBox) getFilesList(id string) ([]File, error) {
	if d.PageSize <= 0 {
		d.PageSize = 100
	}
	res, err := d.listWithLimit(id, d.PageSize)
	if err != nil {
		return nil, err
	}
	return *res, nil
}

func (d *FebBox) listWithLimit(dirID string, pageLimit int64) (*[]File, error) {
	var files []File
	page := int64(1)
	for {

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Read the numeric ErrorCode and Error text in the message — they come straight from FebBox and map to the service's own error table.
  2. If the code indicates auth failure, re-authorize the storage (refresh the OAuth tokens) in the driver settings.
  3. Verify the root folder ID and any configured paths are valid for the account in use.
  4. If rate-limited, reduce concurrency/PageSize and retry after the interval indicated by ServerRunTime/ServerName context.
  5. Search or report the specific code in the OpenList/AList issue tracker if it is undocumented.
Defensive patterns

Strategy: try-catch

Try / catch

body, err := d.request(url, method, cb, resp)
if err != nil {
    var code int
    if _, ok := fmt.Sscanf(err.Error(), "ErrorCode: %d", &code); ok {
        // map known FebBox codes to user-facing messages / retry policy
    }
    return err
}

Prevention

When it happens

Trigger: Any FebBox API call whose response error body carries ErrorCode not in {0, 1, -10001} — e.g. insufficient permissions, invalid folder id, quota exceeded, rate limited, or file not found. Reached at drivers/febbox/util.go:63-64.

Common situations: Deleted or invalid folder ID used as root path; account quota or rate limits hit on the FebBox service; token revoked so all calls fail with a non--10001 code; FebBox API maintenance returning an unfamiliar error code.

Related errors


AI-assisted analysis of AlistGo/alist@843d9dc814 (2026-08-15). Data as JSON: /api/errors/a7fe7d93bc1657f6. Report an issue: GitHub.