goharbor/harbor · error
failed to list namespace
Error message
failed to list namespace: %v
What it means
The Ali ACR ListNamespace OpenAPI call returned a response whose ListNamespaceIsSuccess flag is false, i.e. the API answered but reported business-level failure (permissions, instance state); the error text is wrapped.
Solutions
- Verify the ACR instance ID and domain in the registry connection settings
- Check RAM permissions for the access key on the ACR Enterprise instance
- Retry after fixing credentials; the API may also be temporarily failing
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/pkg/reg/adapter/aliacr/openapi.go:229 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of goharbor/harbor@7b2fd08cc5 (2026-08-16).
Data as JSON: /api/errors/ef94c1ddc08959de.
Report an issue: GitHub.
Appendix: source
Thrown at src/pkg/reg/adapter/aliacr/openapi.go:229
// ListNamespace returns a list of namespaces
func (acree *acreeOpenapi) ListNamespace() ([]string, error) {
var namespaces []string
nsReq := cr_ee.CreateListNamespaceRequest()
nsReq.SetDomain(acree.domain)
nsReq.InstanceId = acree.instanceID
page := 1
for {
nsReq.PageNo = requests.NewInteger(page)
nsResp, err := acree.client.ListNamespace(nsReq)
if err != nil {
return nil, err
}
for _, ns := range nsResp.Namespaces {
namespaces = append(namespaces, ns.NamespaceName)
}
if !nsResp.ListNamespaceIsSuccess {
return nil, fmt.Errorf("failed to list namespace: %v", nsResp)
}
total, err := strconv.Atoi(nsResp.TotalCount)
if err != nil {
return nil, err
}
if total-(nsResp.PageNo*nsResp.PageSize) <= 0 {
break
}
page++
}
return namespaces, nil
}
// ListRepository returns a list of repositories in the specified namespace
func (acree *acreeOpenapi) ListRepository(namespaceName string) ([]*repository, error) {
var repos []*repository
reposReq := cr_ee.CreateListRepositoryRequest()
reposReq.SetDomain(acree.domain)View on GitHub (pinned to 7b2fd08cc5)