-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify AuthorizationMismatchError #3201
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit b50643f Collapsed results for better readability
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3201 +/- ##
=======================================
Coverage 80.70% 80.70%
=======================================
Files 380 380
Lines 93207 93205 -2
=======================================
Hits 75222 75222
+ Misses 15280 15278 -2
Partials 2705 2705
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks
Required for onflow/flow-go#5596
Description
Given the
AuthorizationMismatchError
is already a secondary error ofFieldMismatchError
, theSecondaryError()
method ofAuthorizationMismatchError
would not get called during pretty printing. So simply include all error details in theError()
method.A better fix is to make
FieldMismatchError
aParentError
, and return it's children, so the pretty-printer would print recursively. However, when there are multiple levels of child errors, pretty-printer doesn't print the errors at the top, but rather only print the ones at the bottom of the tree (the ones without any more child errors). There is also bit of mixed/confused usages ofChildErrors()
andSecondaryError()
. We may need to fix both of these separately.master
branchFiles changed
in the Github PR explorer