temporalio/temporal · error
error reading contents: %w
Error message
error reading contents: %w
What it means
Error "error reading contents: %w" thrown in temporalio/temporal.
Source
Thrown at common/persistence/query_util.go:63
if err != nil {
return nil, fmt.Errorf("error opening file %s: %w", filePath, err)
}
files = append(files, f)
}
return LoadAndSplitQueryFromReaders(files)
}
// LoadAndSplitQueryFromReaders loads and split cql / sql query into one statement per string.
// Comments are removed from the query.
func LoadAndSplitQueryFromReaders(
readers []io.Reader,
) ([]string, error) {
result := make([]string, 0, querySliceDefaultSize)
for _, r := range readers {
content, err := io.ReadAll(r)
if err != nil {
return nil, fmt.Errorf("error reading contents: %w", err)
}
n := len(content)
contentStr := string(bytes.ToLower(content))
for i, j := 0, 0; i < n; i = j {
// stack to keep track of open parenthesis/blocks
var st []byte
var stmtBuilder strings.Builder
stmtLoop:
for ; j < n; j++ {
switch contentStr[j] {
case queryDelimiter:
if len(st) == 0 {
j++
break stmtLoop
}
case sqlLeftParenthesis:View on GitHub (pinned to bde624efd1)
When it happens
Trigger: Thrown at common/persistence/query_util.go:63 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/831054d2630a5e88.
Report an issue: GitHub.