MissingFieldError once again extends Error #10051
Merged
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.
Based on the original PR here - #9126 (Thanks @matthargett!)
Opening this to address some changes that were requested in the above PR but never got picked up by the original author.
Assuming the original review by @benjamn still stands, this should be good to go :-)
From previous discussion:
Some crash reporting services were not categorizing the
MissingFieldError
with other custom errors because it does not extend from the baseError
class. This was an intentional performance fix in #8734, but because that PR also ended up batching huge arrays ofMissingFieldError
s into a singleMissingFieldError
, the overhead from the super() call to Error was no longer a huge issue - so we're reverting that change here.Checklist:
Make sure all of the significant new logic is covered by tests