Conversation
This way we don't lose valuable data context from lower layers.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #2739 +/- ##
==========================================
- Coverage 2.29% 2.28% -0.01%
==========================================
Files 171 171
Lines 10287 10309 +22
==========================================
Hits 236 236
- Misses 10051 10073 +22
🚀 New features to boost your workflow:
|
Zokhoi
approved these changes
Mar 7, 2026
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.
While working on #2736, I noticed that the errors produced by our new error system could be improved. This is something that we will periodically bump in to, as we enhance error messages with additional context while we work on them.
This change adds the regex of the failed filter(s) to the logging, but also more broadly exposes the contextual error data to the full error result.
With the
exncrate, we have a layered error system which shows the call trace that this error took to fail. OurErrorTypealso has associated contextual data, but all except for the top-most layer is not preserved.This changes that, instead having a list of the associated error data under the field
extra.New call trace:
JSON:
{ "code": 5100, "message": "The request violates a configured content filter", "data": { "call_trace": "[... see above ...]", "code_trace": [ 1001, 1008, 1008, 1008, 5100 ], "extra": [ null, null, null, null, { "failed": [ { "description": "Cannot join using example.net emails (example)", "filter_id": 4, "regex": "(?i)^.*@example\\.net$" } ], "field": "email", "value": "foobar@example.net" } ] } }This shows which filter(s) failed, the regex that triggered it, and the listed description value associated with the filter.