Tencent/WeKnora · error

sandbox: provider %q does not expose templates

Error message

sandbox: provider %q does not expose templates

What it means

Type-assertion guard in QueryTemplates: the resolved sandbox provider client does not implement the RemoteTemplateCatalog interface, so this provider type exposes no remote template listing. The offending input is the sandbox config's provider type (effective.Type), e.g. a provider backend without template support.

Source

Thrown at internal/application/service/tenant_sandbox_config.go:620

	for _, endpoint := range sandboxConfigEndpoints(merged) {
		if err := sandbox.ValidateOutboundURLWithPolicy(endpoint, sandbox.OutboundURLPolicy{
			AllowPrivate: merged.AllowPrivateEndpoints,
		}); err != nil {
			return nil, err
		}
	}
	effective, err := sandbox.ResolveEffectiveConfig(merged, sandbox.DefaultConfig())
	if err != nil {
		return nil, err
	}
	client, err := s.newClient(effective)
	if err != nil {
		return nil, err
	}
	catalog, ok := any(client).(sandbox.RemoteTemplateCatalog)
	if !ok {
		return nil, fmt.Errorf("sandbox: provider %q does not expose templates", effective.Type)
	}
	templates, err := catalog.ListTemplates(ctx)
	if err != nil {
		return nil, err
	}
	result := &SandboxTemplateCatalog{Templates: deduplicateSandboxTemplates(templates)}
	usable := pickStandardTemplate(result.Templates)
	if usable != nil {
		result.StandardTemplateID = usable.ID
	}
	oldStandardIDs := standardTemplateIDs(result.Templates)
	// Listing is read-only. Creating or replacing the WeKnora template is an
	// explicit settings-page action: auto-ensure on every refresh made DNS
	// and image changes impossible to apply, and left admins unsure whether
	// they had asked for a build.
	wantStandard := in.ReplaceStandard || (in.EnsureStandard && usable == nil)
	if wantStandard {
		op := "ensure"

View on GitHub (pinned to 988cbb0330)

Solutions

  1. Switch the tenant's sandbox config to a provider type that supports templates
  2. Check provider implementation and register a RemoteTemplateCatalog client for it
  3. Validate provider capabilities before showing the template tab/query
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at internal/application/service/tenant_sandbox_config.go:620 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/74bc22b8a3750fff. Report an issue: GitHub.