{"record":{"id":"e48a08de91e28c06","repo":"Tencent/WeKnora","slug":"web-search-provider-not-found-s","errorCode":null,"errorMessage":"web search provider not found: %s","messagePattern":"web search provider not found: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/application/service/web_search.go","lineNumber":105,"sourceCode":"// 2. The deprecated config.Provider field (backward compatibility) — creates with empty params\nfunc (s *WebSearchService) resolveProvider(\n\tctx context.Context,\n\tproviderID string,\n\tcfg *types.WebSearchConfig,\n) (interfaces.WebSearchProvider, error) {\n\t// New path: load provider entity from DB\n\tif providerID != \"\" {\n\t\ttenantID, ok := types.TenantIDFromContext(ctx)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"workspace ID not found in context\")\n\t\t}\n\n\t\tentity, err := s.providerRepo.GetByID(ctx, tenantID, providerID)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to load web search provider %s: %w\", providerID, err)\n\t\t}\n\t\tif entity == nil {\n\t\t\treturn nil, fmt.Errorf(\"web search provider not found: %s\", providerID)\n\t\t}\n\n\t\tparams := mergeProxyFromWebSearchConfig(entity.Parameters, cfg)\n\t\tprovider, err := s.registry.CreateProvider(string(entity.Provider), params)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to create provider %s (%s): %w\", entity.Name, entity.Provider, err)\n\t\t}\n\t\treturn provider, nil\n\t}\n\n\t// Backward compatibility: use the deprecated config.Provider field\n\tif cfg.Provider != \"\" {\n\t\tlogger.Warnf(ctx, \"Using deprecated WebSearchConfig.Provider field: %s. Please migrate to WebSearchProviderEntity.\", cfg.Provider)\n\t\tparams := mergeProxyFromWebSearchConfig(types.WebSearchProviderParameters{\n\t\t\tAPIKey: cfg.APIKey,\n\t\t}, cfg)\n\t\tprovider, err := s.registry.CreateProvider(cfg.Provider, params)\n\t\tif err != nil {","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/application/service/web_search.go#L87-L123","documentation":"Resolution failure in WebSearchService.resolveProvider: a provider entity was previously looked up (or a name given) but the provider registry could not construct/locate a matching web search provider implementation. The %s names the requested provider; it fires when the stored provider type is unknown to the registry or the provider record vanished, blocking the Search flow.","triggerScenarios":"Thrown at internal/application/service/web_search.go:105 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the providerID (config may be stale after deletion)","List available providers for the tenant and pick a valid one","Recreate the provider entity if it was removed"],"exampleFix":null,"handlingStrategy":"validation","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"}