temporalio/temporal · error

error reading contents: unmatched `%c`

Error message

error reading contents: unmatched `%c`

What it means

Error "error reading contents: unmatched `%c`" thrown in temporalio/temporal.

Source

Thrown at common/persistence/query_util.go:185

							j++
						}
						i = j
					}

				default:
					// no-op: generic character
				}
			}

			if len(st) > 0 {
				switch st[len(st)-1] {
				case sqlLeftParenthesis:
					return nil, fmt.Errorf("error reading contents: unmatched left parenthesis")
				case sqlBeginKeyword[0]:
					return nil, fmt.Errorf("error reading contents: unmatched `BEGIN` keyword")
				default:
					// should never enter here
					return nil, fmt.Errorf("error reading contents: unmatched `%c`", st[len(st)-1])
				}
			}

			_, _ = stmtBuilder.Write(content[i:j])
			stmt := strings.TrimSpace(stmtBuilder.String())
			if stmt == "" {
				continue
			}
			result = append(result, stmt)
		}
	}
	return result, nil
}

// hasWordAt is a simple test to check if it matches the whole word:
// it checks if the adjacent characters are not alphanumeric if they exist.
func hasWordAt(s, word string, pos int) bool {
	if pos+len(word) > len(s) || s[pos:pos+len(word)] != word {

View on GitHub (pinned to bde624efd1)

When it happens

Trigger: Thrown at common/persistence/query_util.go:185 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01). Data as JSON: /api/errors/114e696d8cfa1c6c. Report an issue: GitHub.