Skip to content

ts config validate, push and diff echo config lines in TOML parse errors #1396

Open

Description

@dhruv8sh

Description

ts config validate, ts config push and ts config diff still print the offending config line in TOML parse errors. That line can contain values an operator keeps private. #1291 fixed this for ts prebid client (see #1202), but these commands use different load paths:

  • They load through edgezero-core's deserialize_app_config_with_options, whose AppConfigError Display is failed to parse {path} as TOML: {source}.
  • The CLI's app_config::load_settings (used by ts config ad-templates * and ts audit ad-templates verify) wraps the same error as failed to load {path}: {err}.

ts config push is the step most likely to run in CI, so the text can land in CI logs.

Reproduction steps

  1. Create trusted-server.toml whose third line is an unterminated string, for example origin_url = "https://origin.example.com/internal.
  2. Run ts config validate (or push, diff, or a load_settings caller).
  3. The error includes the parser snippet:
failed to load <tmp>/trusted-server.toml: failed to parse <tmp>/trusted-server.toml as TOML: TOML parse error at line 3, column 58
  |
3 | origin_url = "https://origin.example.com/internal
  |                                                   ^
invalid basic string, expected `"`

Expected behavior

The error names the file, line and column, but does not echo config text or the parser's snippet, matching ts prebid client after #1291.

Done when

  • edgezero-core's config loader exposes the parse error location without the source snippet (or the CLI can get it without formatting the source).
  • app_config::load_settings and the ts config validate / push / diff paths report path, line and column only.
  • Tests assert that a parse error from these commands contains the line/column and does not contain the config text.

Affected area

CI / Tooling

Context

Cross-cutting finding in aram356's review on #1291.

Activity

  1. added theissue type on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions