feat: panics upon startup when RPC issues occur include the offending chain (#4323)
### 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 <!-- Are there any minor or drive-by changes also included? --> ### Related issues <!-- - Fixes #[issue number here] --> ### Backward compatibility <!-- Are these changes backward compatible? Are there any infrastructure implications, e.g. changes that would prohibit deploying older commits using this infra tooling? Yes/No --> ### Testing <!-- What kind of testing have these changes undergone? None/Manual/Unit Tests -->pull/4329/head
parent
ddf6834c7b
commit
57bbb16cc1
Loading…
Reference in new issue