Tencent/WeKnora · error
ErrSandboxInventoryUnverifiable
ErrSandboxInventoryUnverifiable
Error message
%w: %v
What it means
Generic wrapper in TenantSandboxConfigService.Delete: the underlying error (from listSandboxes) is wrapped with context so the caller knows deletion failed while enumerating active sandboxes that still reference the config. The config is not deleted.
Solutions
- Inspect the wrapped error to see why sandbox listing failed
- Fix the dependency that blocked listSandboxes (DB, sandbox service)
- Retry Delete once the listing dependency recovers
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at internal/application/service/tenant_sandbox_config.go:1058 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/3e7ad997c7fe2b77.
Report an issue: GitHub.
Appendix: source
Thrown at internal/application/service/tenant_sandbox_config.go:1058
func (s *TenantSandboxConfigService) Delete(
ctx context.Context, tenantID uint64, id string, force bool,
) error {
entity, err := s.repo.GetByID(ctx, tenantID, id)
if err != nil {
return err
}
// Reporting success for a config that is not there would let the UI drop a
// card the workspace still has, so absence is an explicit 404.
if entity == nil {
return apperrors.NewNotFoundError("sandbox config not found")
}
if types.IsSandboxWorkspacePolicyRow(entity) {
return apperrors.NewBadRequestError("workspace policy cannot be deleted here")
}
summaries, listErr := s.listSandboxes(ctx, entity.Config, tenantID, id)
if listErr != nil {
if !force {
return fmt.Errorf("%w: %v", ErrSandboxInventoryUnverifiable, listErr)
}
logger.Warnf(ctx,
"[sandbox] force-deleting config %s without verifying its sandboxes: %v",
id, listErr)
}
if len(summaries) > 0 {
inv := s.inventoryFromSummaries(ctx, tenantID, id, summaries)
return &SandboxesStillLiveError{Inventory: inv}
}
if err := s.releaseSkillSnapshots(ctx, entity, tenantID, id, force); err != nil {
return err
}
return s.repo.SoftDelete(ctx, tenantID, id)
}
func snapshotReleaserFrom(client sandbox.ConfigSandboxClient) (sandboxSnapshotReleaser, bool) {
if client == nil {
return nil, falseView on GitHub (pinned to 988cbb0330)