Skip to content

Name the config override key in API errors - #10

Open
johnmaguire wants to merge 2 commits into
mainfrom
error-override-key
Open

johnmaguire wants to merge 2 commits into
mainfrom
error-override-key

Conversation

@johnmaguire

@johnmaguire johnmaguire commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

The API reports an invalid config override key by its list index, for example:

ERR_INVALID_VALUE: must be an allowed override option (configOverrides[1].key)

Finding which override that is means counting entries in the HCL. The client now looks the key up in the request body it sent and shows it:

ERR_INVALID_VALUE: must be an allowed override option (configOverrides[1].key "dns.resolver_addrs")

Only override key paths are resolved: configOverrides[N].key (tags) and overrides[N].key (network config overrides). No other request field is ever echoed, since fields elsewhere can be secrets. A path that does not resolve keeps the old format.

The API reports an invalid override key by its index, such as
configOverrides[1].key, which means counting entries in the HCL. Look the
path up in the request body and show the key. Only key paths are
resolved, since values can be secrets.
@johnmaguire
johnmaguire marked this pull request as ready for review November 6, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant