{"record":{"id":"8f4b0531bb5c7b8b","repo":"googleapis/mcp-toolbox","slug":"element-in-sequence-is-not-a-string-v","errorCode":null,"errorMessage":"element in sequence is not a string: %v","messagePattern":"element in sequence is not a string: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/bigquery/bigquery.go","lineNumber":126,"sourceCode":"// (which it splits by comma) and a sequence of strings into a string slice.\ntype StringOrStringSlice []string\n\n// UnmarshalYAML implements the yaml.Unmarshaler interface.\nfunc (s *StringOrStringSlice) UnmarshalYAML(unmarshal func(any) error) error {\n\tvar v any\n\tif err := unmarshal(&v); err != nil {\n\t\treturn err\n\t}\n\tswitch val := v.(type) {\n\tcase string:\n\t\t*s = strings.Split(val, \",\")\n\t\treturn nil\n\tcase []any:\n\t\tfor _, item := range val {\n\t\t\tif str, ok := item.(string); ok {\n\t\t\t\t*s = append(*s, str)\n\t\t\t} else {\n\t\t\t\treturn fmt.Errorf(\"element in sequence is not a string: %v\", item)\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"cannot unmarshal %T into StringOrStringSlice\", v)\n}\n\nfunc (r Config) SourceConfigType() string {\n\t// Returns BigQuery source type\n\treturn SourceType\n}\n\nfunc (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error) {\n\tif r.WriteMode == \"\" {\n\t\tr.WriteMode = WriteModeAllowed\n\t\tif r.ReadOnly != nil && *r.ReadOnly {\n\t\t\tr.WriteMode = WriteModeBlocked\n\t\t}","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/bigquery/bigquery.go#L108-L144","documentation":"Error \"element in sequence is not a string: %v\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/sources/bigquery/bigquery.go:126 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}