[Bug] Trino/Presto queries fail when query metadata contains non-ASCII characters
Summary
Queries to a Trino or Presto data source fail before they are sent whenever the query metadata contains non-ASCII characters outside Latin-1 (for example Korean, Japanese, or Chinese text in the project name, owner name, experiment tags, or user name).
getQueryTagString() returns the raw JSON.stringify() output, and Presto.ts sends it as the X-Trino-Client-Info / X-Presto-Client-Info HTTP header. JSON.stringify does not escape non-ASCII characters, and Node's HTTP client rejects header values that contain characters above U+00FF:
TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["X-Trino-Client-Info"]Expected Behavior
Queries run normally regardless of the language used in project, owner, tag, or user names.
Current Behavior
Any query whose metadata contains such a character fails with Invalid character in header content. Only Trino / Presto are affected: Presto.ts is the only integration that puts query metadata into an HTTP header. Snowflake uses the same getQueryTagString() helper but passes the result as the queryTag connection option, BigQuery sanitizes metadata into [a-z0-9_-] labels, and the other SQL integrations do not send query metadata at all.
Steps to reproduce
- Add a Trino (or Presto) data source.
- Create an experiment whose project, owner, or tags contain non-ASCII text (e.g.
추천). - Refresh results. The query fails with the error above.
Source: growthbook/growthbook