{"record":{"id":"74bc22b8a3750fff","repo":"Tencent/WeKnora","slug":"sandbox-provider-q-does-not-expose-templates","errorCode":null,"errorMessage":"sandbox: provider %q does not expose templates","messagePattern":"sandbox: provider %q does not expose templates","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/application/service/tenant_sandbox_config.go","lineNumber":620,"sourceCode":"\n\tfor _, endpoint := range sandboxConfigEndpoints(merged) {\n\t\tif err := sandbox.ValidateOutboundURLWithPolicy(endpoint, sandbox.OutboundURLPolicy{\n\t\t\tAllowPrivate: merged.AllowPrivateEndpoints,\n\t\t}); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\teffective, err := sandbox.ResolveEffectiveConfig(merged, sandbox.DefaultConfig())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tclient, err := s.newClient(effective)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tcatalog, ok := any(client).(sandbox.RemoteTemplateCatalog)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"sandbox: provider %q does not expose templates\", effective.Type)\n\t}\n\ttemplates, err := catalog.ListTemplates(ctx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresult := &SandboxTemplateCatalog{Templates: deduplicateSandboxTemplates(templates)}\n\tusable := pickStandardTemplate(result.Templates)\n\tif usable != nil {\n\t\tresult.StandardTemplateID = usable.ID\n\t}\n\toldStandardIDs := standardTemplateIDs(result.Templates)\n\t// Listing is read-only. Creating or replacing the WeKnora template is an\n\t// explicit settings-page action: auto-ensure on every refresh made DNS\n\t// and image changes impossible to apply, and left admins unsure whether\n\t// they had asked for a build.\n\twantStandard := in.ReplaceStandard || (in.EnsureStandard && usable == nil)\n\tif wantStandard {\n\t\top := \"ensure\"","sourceCodeStart":602,"sourceCodeEnd":638,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/application/service/tenant_sandbox_config.go#L602-L638","documentation":"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.","triggerScenarios":"Thrown at internal/application/service/tenant_sandbox_config.go:620 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Switch the tenant's sandbox config to a provider type that supports templates","Check provider implementation and register a RemoteTemplateCatalog client for it","Validate provider capabilities before showing the template tab/query"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}