{"record":{"id":"7d3e08bfdc322282","repo":"larksuite/cli","slug":"secret-provider-q-is-configured-as-null","errorCode":null,"errorMessage":"secret provider %q is configured as null","messagePattern":"secret provider %q is configured as null","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/binding/types.go","lineNumber":210,"sourceCode":"\t\tcase \"exec\":\n\t\t\tif cfg.Defaults.Exec != \"\" {\n\t\t\t\treturn cfg.Defaults.Exec\n\t\t\t}\n\t\t}\n\t}\n\treturn DefaultProviderAlias\n}\n\n// LookupProvider resolves a provider config from the registry.\n// Returns the provider config or an error if not found.\n// Special case: env source with \"default\" provider returns a synthetic empty env provider.\nfunc LookupProvider(ref *SecretRef, cfg *SecretsConfig) (*ProviderConfig, error) {\n\tproviderName := ResolveDefaultProvider(ref, cfg)\n\n\tif cfg != nil && cfg.Providers != nil {\n\t\tif pc, ok := cfg.Providers[providerName]; ok {\n\t\t\tif pc == nil {\n\t\t\t\treturn nil, fmt.Errorf(\"secret provider %q is configured as null\", providerName)\n\t\t\t}\n\t\t\tif pc.Source != ref.Source {\n\t\t\t\treturn nil, fmt.Errorf(\"secret provider %q has source %q but ref requests %q\",\n\t\t\t\t\tproviderName, pc.Source, ref.Source)\n\t\t\t}\n\t\t\treturn pc, nil\n\t\t}\n\t}\n\n\t// Special case: default env provider (implicit, per OpenClaw resolve.ts)\n\tif ref.Source == \"env\" && providerName == DefaultProviderAlias {\n\t\treturn &ProviderConfig{Source: \"env\"}, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"secret provider %q is not configured (ref: %s:%s:%s)\",\n\t\tproviderName, ref.Source, providerName, ref.ID)\n}\n","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/internal/binding/types.go#L192-L228","documentation":"LookupProvider found the named provider key in secrets.providers config but its value is JSON null. A null entry carries no Source and cannot serve a secret ref, so the lookup fails explicitly instead of nil-panicking downstream.","triggerScenarios":"Config like \"providers\": {\"default\": null} or an explicitly nulled provider entry that a ref's `provider` field names (including the DefaultProviderAlias).","commonSituations":"Disabling a provider by setting it to null instead of removing the key; merge tooling or env overlays that write null values; partially migrated config.","solutions":["Remove the null provider key or give it a full ProviderConfig with a matching source","Point the ref's `provider` field at an existing, non-null provider","Update refs relying on the default alias to name a configured provider"],"exampleFix":"// before\n{\"secrets\": {\"providers\": {\"default\": null}}}\n// after\n{\"secrets\": {\"providers\": {\"default\": {\"source\": \"env\"}}}}","handlingStrategy":"validation","validationCode":"for name, p := range cfg.Secrets.Providers {\n    if p == nil {\n        return fmt.Errorf(\"provider %q is null; remove it or define {source: ...}\", name)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Disable providers by deleting the key, not setting null","Diff config after automated merges to catch injected nulls","Assert providers map contents in a startup config check"],"tags":["config","secrets","providers"],"backgroundTag":"invalid-provider-config","analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}