{"record":{"id":"c2ee365f324551c5","repo":"temporalio/temporal","slug":"error-reading-contents-unmatched-quotes","errorCode":null,"errorMessage":"error reading contents: unmatched quotes","messagePattern":"error reading contents: unmatched quotes","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/persistence/query_util.go","lineNumber":160,"sourceCode":"\t\t\t\t\t\t}\n\t\t\t\t\t\tst = st[:len(st)-1]\n\t\t\t\t\t\tj = after + len(sqlLoopKeyword) - 1\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif len(st) == 0 || st[len(st)-1] != sqlBeginKeyword[0] {\n\t\t\t\t\t\t\treturn nil, errors.New(\"error reading contents: unmatched `END` keyword\")\n\t\t\t\t\t\t}\n\t\t\t\t\t\tst = st[:len(st)-1]\n\t\t\t\t\t\tj += len(sqlEndKeyword) - 1\n\t\t\t\t\t}\n\n\t\t\t\tcase sqlSingleQuote, sqlDoubleQuote:\n\t\t\t\t\tquote := contentStr[j]\n\t\t\t\t\tj++\n\t\t\t\t\tfor j < n && contentStr[j] != quote {\n\t\t\t\t\t\tj++\n\t\t\t\t\t}\n\t\t\t\t\tif j == n {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"error reading contents: unmatched quotes\")\n\t\t\t\t\t}\n\n\t\t\t\tcase sqlLineComment[0]:\n\t\t\t\t\tif j+len(sqlLineComment) <= n && contentStr[j:j+len(sqlLineComment)] == sqlLineComment {\n\t\t\t\t\t\t_, _ = stmtBuilder.Write(bytes.TrimRight(content[i:j], \" \"))\n\t\t\t\t\t\tfor j < n && contentStr[j] != '\\n' {\n\t\t\t\t\t\t\tj++\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti = j\n\t\t\t\t\t}\n\n\t\t\t\tdefault:\n\t\t\t\t\t// no-op: generic character\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif len(st) > 0 {\n\t\t\t\tswitch st[len(st)-1] {","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/common/persistence/query_util.go#L142-L178","documentation":"Error \"error reading contents: unmatched quotes\" thrown in temporalio/temporal.","triggerScenarios":"Thrown at common/persistence/query_util.go:160 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":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}