{"record":{"id":"a6608114e3ec48db","repo":"googleapis/mcp-toolbox","slug":"invalid-queryexecmode-q-must-be-one-of-q-q","errorCode":null,"errorMessage":"invalid queryExecMode %q: must be one of %q, %q, %q, %q, or %q","messagePattern":"invalid queryExecMode %q: must be one of %q, %q, %q, %q, or %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/postgres/postgres.go","lineNumber":219,"sourceCode":"\t\tu.RawQuery = q.Encode()\n\t}\n\treturn u.String()\n}\n\nfunc ParseQueryExecMode(queryExecMode string) (pgx.QueryExecMode, error) {\n\tswitch queryExecMode {\n\tcase \"\", \"cache_statement\":\n\t\treturn pgx.QueryExecModeCacheStatement, nil\n\tcase \"cache_describe\":\n\t\treturn pgx.QueryExecModeCacheDescribe, nil\n\tcase \"describe_exec\":\n\t\treturn pgx.QueryExecModeDescribeExec, nil\n\tcase \"exec\":\n\t\treturn pgx.QueryExecModeExec, nil\n\tcase \"simple_protocol\":\n\t\treturn pgx.QueryExecModeSimpleProtocol, nil\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"invalid queryExecMode %q: must be one of %q, %q, %q, %q, or %q\", queryExecMode, \"cache_statement\", \"cache_describe\", \"describe_exec\", \"exec\", \"simple_protocol\")\n\t}\n}\n","sourceCodeStart":201,"sourceCodeEnd":222,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/postgres/postgres.go#L201-L222","documentation":"ParseQueryExecMode fell through its switch on the configured queryExecMode string; the value is not one of the five accepted pgx execution modes (empty, cache_statement, cache_describe, describe_exec, exec, simple_protocol).","triggerScenarios":"Thrown at internal/sources/postgres/postgres.go:219 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set queryExecMode to one of: cache_statement, cache_describe, describe_exec, exec, or simple_protocol","Omit queryExecMode entirely to accept the default (cache_statement)","Check for typos or trailing whitespace in the YAML value"],"exampleFix":null,"handlingStrategy":"validation","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"}