AlistGo/alist · warning

no shared albums found

Error message

no shared albums found

What it means

The Baidu Photo union API returned errno 50820, mapped in Request (drivers/baidu_photo/utils.go:48) to 'no shared albums found'. It means the endpoint was asked for shared-album data but the account (or the given invitation context) has no shared albums to return. It is a normal empty-state response surfaced as an error.

Source

Thrown at drivers/baidu_photo/utils.go:48

	if callback != nil {
		callback(req)
	}
	if resp != nil {
		req.SetResult(resp)
	}
	res, err := req.Execute(method, furl)
	if err != nil {
		return nil, err
	}

	erron := utils.Json.Get(res.Body(), "errno").ToInt()
	switch erron {
	case 0:
		break
	case 50805:
		return nil, fmt.Errorf("you have joined album")
	case 50820:
		return nil, fmt.Errorf("no shared albums found")
	case 50100:
		return nil, fmt.Errorf("illegal title, only supports 50 characters")
	// case -6:
	// 	if err = d.refreshToken(); err != nil {
	// 		return nil, err
	// 	}
	default:
		return nil, fmt.Errorf("errno: %d, refer to https://photo.baidu.com/union/doc", erron)
	}
	return res, nil
}

//func (d *BaiduPhoto) Request(furl string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) {
//	res, err := d.request(furl, method, callback, resp)
//	if err != nil {
//		return nil, err
//	}
//	return res.Body(), nil

View on GitHub (pinned to 843d9dc814)

Solutions

  1. Treat 50820 as an empty list rather than a hard failure in listing code
  2. Refresh the album list (GetAllAlbum) and invalidate cached album IDs when it fires
  3. Verify the share/invitation code is still valid before listing its files

Example fix

// before
files, err := d.GetAllAlbumFile(ctx, album, passwd)
if err != nil { return nil, err }

// after
files, err := d.GetAllAlbumFile(ctx, album, passwd)
if err != nil && strings.Contains(err.Error(), "no shared albums found") {
    return []model.Obj{}, nil // empty state, not a failure
}
if err != nil { return nil, err }
Defensive patterns

Strategy: fallback

Try / catch

files, err := d.GetAllAlbumFile(ctx, album, passwd)
if err != nil && strings.Contains(err.Error(), "no shared albums found") {
    return []model.Obj{}, nil // treat as empty, drop stale album cache
}
if err != nil {
    return nil, err
}

Prevention

When it happens

Trigger: Calling GetAllAlbumFile / GetAlbumDetail for a shared album that was deleted or left; listing the shared-album scope on a fresh account that never joined any share; using an album_id that no longer resolves.

Common situations: Stale cached album IDs after the owner deleted the share; testing a new account with no shares; retrying after leaving an album.

Related errors


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