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
AVM: report structure txn failure info #5875
Conversation
46279ec
to
3f54b84
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5875 +/- ##
==========================================
+ Coverage 55.95% 55.97% +0.02%
==========================================
Files 477 478 +1
Lines 67436 67535 +99
==========================================
+ Hits 37736 37805 +69
- Misses 27149 27174 +25
- Partials 2551 2556 +5 ☔ View full report in Codecov by Sentry. |
7ecdd3e
to
926a7e8
Compare
That does start to look a bit out of hand, but my thinking was that it made the single top-level message (in cases where existing code or UIs only reports that) more useful. It becomes more akin to a stack trace so you can see which inner actually caused a problem. I know I had run into problems where a test with inner fails and it was not immediately obvious which depth had the error. Your example looks bad, but I think in practice you're only one or two levels deep and so the duplication is not so bad and remains helpful. If we did only report a single error, would it be the top-level message and PC (which would always be on a |
That makes sense, there's likely systems out there that are already passing the top-level message as it is.
Hmmm, I'd say the inner-most error would be the most useful, as that's where something actually failed. Now I'm thinking about it, if you were just interested in decoding the error to display something to the enduser, you might also want to know the appID of the inner for some more context. Just in case you're expecting multiple different inners to be called, and I assume if the appID is missing then it's more of a "failed to deploy" message. |
Maybe I can add that in as I concatenate the inner error. It may also be useful enough that it should go in the structured data. |
Extend goal.py so it can produce a curl url, rather than rely on the Python SDK entirely. Thus we can test this feature before SDK support for the `data` field in the response.
070412a
to
cebb28e
Compare
cebb28e
to
3384cf2
Compare
This will likely cause some CI failures, as it's likely to cause some churn in e2e tests.
467c86f
to
d440796
Compare
This is a proposal to add structured info (PC, stack, scratch, logs) from failed transactions in the JSON response.
I am less concerned with guaranteeing backward compatibility on this structure until some time and usage has occurred, so it is not codified in an openapi file. I think we should consider the
.data
field of the returned JSON to fall outside the usual semvar promise --- it is more like an error message that we hope is useful, but is not yet cast in stone. For example, we do not specify the the potential Data returns on error in/v2/applications/{application-id}/boxes
and/v2/accounts/{address}
.See
avm-failure-info.py
andTestAppErrorDetails
inevalStateful_test.go
for the best examples of the proposed return values.