This repository has been archived by the owner on Oct 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
enhancement: extract better error messages from indexers #1435
Merged
lostman
merged 10 commits into
develop
from
maciej/1434-better-error-messages-from-indexers
Oct 30, 2023
Merged
enhancement: extract better error messages from indexers #1435
lostman
merged 10 commits into
develop
from
maciej/1434-better-error-messages-from-indexers
Oct 30, 2023
Conversation
This file contains 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
lostman
changed the title
Maciej/1434 better error messages from indexers
enhancement: extract better error messages from indexers
Oct 25, 2023
…-error-messages-from-indexers
lostman
force-pushed
the
maciej/1434-better-error-messages-from-indexers
branch
from
October 25, 2023 11:50
045e4e9
to
29a419c
Compare
lostman
force-pushed
the
maciej/1434-better-error-messages-from-indexers
branch
from
October 25, 2023 13:19
7bea332
to
d506f90
Compare
ra0x3
suggested changes
Oct 25, 2023
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.
- The look of it is fine, however needs to be organized a bit differently
lostman
force-pushed
the
maciej/1434-better-error-messages-from-indexers
branch
from
October 25, 2023 16:03
7fcea42
to
1ff69fe
Compare
ra0x3
reviewed
Oct 25, 2023
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.
@lostman Could you also include a QA report with this - for maybe 30K blocks each run - given how much of a critical path this PR touches?
Co-authored-by: rashad <[email protected]>
deekerno
suggested changes
Oct 26, 2023
deekerno
approved these changes
Oct 26, 2023
ra0x3
approved these changes
Oct 30, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Closes #1434.
This PR improves the error messages from indexers. Block height, transaction ID, the name of decoded struct, failing handlers, etc., are automatically included in the error output.
This is implemented using
anyhow
with the error propagating upwards, accumulating more context.Since we now use
anyhow
internally, it is also added to indexer'sCargo.toml
(existing users will have to update manually).Since #1425, users can also use
Result
type in the handler functions, so having anyhow already included should prove useful (the handlers can return()
, orResult
).Testing steps
Same testing steps as #1425.
The following handlers can be added to
fuel-explorer
:And then, after building and deploying, the
status
output should be as above.The
other_indexer
is an example of failing codegen, which is harder to reproduce but can be done based on:#1424
Changelog
Please add neat Changelog info here, according to our Contributor's Guide.