feat: panics upon startup when RPC issues occur include the offending chain
Description
Some quick low hanging fruit to make debugging easier in the future. Today (https://discord.com/channels/935678348330434570/1273582453889699843) some chains were having RPC issues and it caused an agent deploy to panic upon startup. Debugging this was hard because the panic message just indicates an error is occurring, but doesn't say what the offending chain is!
Examples:
- https://cloudlogging.app.goo.gl/puQk7hm4fXyJhYKs8
- https://cloudlogging.app.goo.gl/5qZrbc2Ww4LWQXWC6
- https://cloudlogging.app.goo.gl/ZL7mKbBzzJaePtty9
All these panic happen when constructing the cursor, which isn't yet done in an indexing task. The quick and easy fix is to just use expect instead of unwrap
We still unwrap in a few places, but mostly in places that aren't susceptible to flaky RPC issues, e.g. reading from a HashMap that we know should always have an entry, etc
Drive-by changes
Related issues
Backward compatibility
Testing
⚠️ No Changeset found
Latest commit: 5aec9b01dd1f5a036f53fc563f4043f726df9b39
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.60%. Comparing base (
9680efc) to head (5aec9b0). Report is 2 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4323 +/- ##
=======================================
Coverage 70.60% 70.60%
=======================================
Files 97 97
Lines 1388 1388
Branches 173 173
=======================================
Hits 980 980
Misses 389 389
Partials 19 19
| Components | Coverage Δ | |
|---|---|---|
| core | 84.61% <ø> (ø) |
|
| hooks | 68.13% <ø> (ø) |
|
| isms | 74.17% <ø> (ø) |
|
| token | 82.63% <ø> (ø) |
|
| middlewares | 76.95% <ø> (ø) |