ethereum-consensus
ethereum-consensus copied to clipboard
add support for a "debug" mode, or just make error handling more robust
one thing I have noticed while using the Client
type is that failures are annoying to diagnose
the API is strongly-typed and so if URL endpoints and message types are correct, things work well
if they aren't, it is usually hard to know what went wrong
options:
- add some type of "debug" flag inside the
Client
that exposes the information we need (e.g. which endpoint, what does the HTTP message look like as text, what does the response look like as text) - more tolerant response parsing (e.g. try to parse within the realm we expect but if that fails, then make an
Error
variant that dumps the response status code and body (if any))
this last route actually sounds better (even if ultimately we do need the former)