{"record":{"id":"e86307b898237e26","repo":"googleapis/mcp-toolbox","slug":"incorrect-settings-w","errorCode":null,"errorMessage":"incorrect settings: %w","messagePattern":"incorrect settings: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/looker/looker.go","lineNumber":137,"sourceCode":"\n\tvar tokenSource oauth2.TokenSource\n\ttokenSource, _ = initGoogleCloudConnection(ctx)\n\n\ts := &Source{\n\t\tConfig:              r,\n\t\tApiSettings:         &cfg,\n\t\tTokenSource:         tokenSource,\n\t\tAuthTokenHeaderName: \"Authorization\",\n\t}\n\n\tif strings.ToLower(r.UseClientOAuth) == \"false\" {\n\t\tif r.ClientId == \"\" || r.ClientSecret == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"client_id and client_secret need to be specified\")\n\t\t}\n\t\ts.Client = v4.NewLookerSDK(rtl.NewAuthSession(cfg))\n\t\tresp, err := s.Client.Me(\"\", s.ApiSettings)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"incorrect settings: %w\", err)\n\t\t}\n\t\tlogger.DebugContext(ctx, fmt.Sprintf(\"logged in as %s %s\", *resp.FirstName, *resp.LastName))\n\t} else {\n\t\tif strings.ToLower(r.UseClientOAuth) != \"true\" {\n\t\t\ts.AuthTokenHeaderName = r.UseClientOAuth\n\t\t}\n\t\tlogger.DebugContext(ctx, fmt.Sprintf(\"Using AuthTokenHeaderName: %s\", s.AuthTokenHeaderName))\n\t}\n\n\treturn s, nil\n\n}\n\nvar _ sources.Source = &Source{}\n\ntype Source struct {\n\tConfig\n\tClient              *v4.LookerSDK","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/looker/looker.go#L119-L155","documentation":"After building the Looker SDK session with client credentials, Initialize performs a smoke-test call to the Looker /user (Me) endpoint. If that login/API call fails, the credentials or base URL settings are wrong and this wrapped error is returned, embedding the SDK's underlying message. It converts a runtime auth failure into a clear startup error.","triggerScenarios":"client_id/client_secret present but invalid/revoked, baseUrl pointing at a non-Looker or wrong-instance URL, network/DNS failure to Looker, or API3 credentials without sufficient permissions — the Me call returns an error.","commonSituations":"Rotated Looker API3 keys still configured in the toolbox; wrong baseUrl (e.g. missing instance subdomain); firewall/proxy blocking the Looker API; credentials from a disabled Looker user.","solutions":["Verify the embedded SDK error in the message and re-generate Looker API3 client_id/client_secret for an active user.","Confirm baseUrl points to your actual Looker instance (e.g. https://mycompany.looker.com) and is reachable (curl it).","Ensure the Looker user owning the credentials can log in via API and has permission to view their own user record."],"exampleFix":"# before (stale secret)\n    client_id: abc123\n    client_secret: old-secret\n# after\n    client_id: abc123\n    client_secret: ${LOOKER_CLIENT_SECRET}  # freshly generated in Looker Admin > Users > API3","handlingStrategy":"try-catch","validationCode":"// before start: confirm Looker API is reachable and credentials work\ncurl -sS -o /dev/null -w '%{http_code}' https://mycompany.looker.com/api/4.0/login -d \"client_id=$LOOKER_CLIENT_ID&client_secret=$LOOKER_CLIENT_SECRET\"\n// expect 200; non-2xx means the toolbox will fail with 'incorrect settings'","typeGuard":null,"tryCatchPattern":"src, err := cfg.Initialize(ctx, tracer)\nif err != nil {\n    if strings.Contains(err.Error(), \"incorrect settings\") {\n        var sdkErr error\n        if errors.As(err, &sdkErr) || true { /* wrapped %w */ }\n        fmt.Printf(\"Looker login failed: %v — check credentials, baseUrl, and network reachability\\n\", err)\n    }\n    return err\n}","preventionTips":["Smoke-test Looker API3 credentials with a login curl call before deploying.","Keep baseUrl aligned with your Looker instance domain.","Rotate credentials in the toolbox immediately when rotating them in Looker admin."],"tags":["looker","authentication","api","initialization"],"backgroundTag":"authentication-failed","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}