Tag invalid-value errors with an opaque field+value locator#19
Closed
riccardo-perotti wants to merge 3 commits into
Closed
Tag invalid-value errors with an opaque field+value locator#19riccardo-perotti wants to merge 3 commits into
riccardo-perotti wants to merge 3 commits into
Conversation
Tag the otherwise-anonymous "invalid value" with <dbr_instances.tag>.<dbr_tables.id>.<dbr_fields.id>:<value-shape> so it can be traced to a field and value-shape from logs, without leaking schema names or the offending value to outside consumers. Inserted before the "at FILE line N" backtrace so UnRPC's strip still removes the path and code=internal_error is preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Field::makevaluenow stamps the otherwise-anonymousinvalid valueerror with an opaque locator:Format:
<dbr_instances.tag>.<dbr_tables.id>.<dbr_fields.id>:<value-shape>— numeric ids + a value shape (length/char-classes/ref/undef), never schema names or the raw value, so it's safe for external consumers. Resolve the ids against the dbr config to recover the field.Inserted before the
at FILE line Nbacktrace so UnRPC's$-anchored strip still removes the file path andcode=internal_erroris preserved. Locator-building is guarded so it can never mask the original error.🤖 Generated with Claude Code