lighthouse-pulse/beacon_node
Paul Hauner ba9c4c5eea Return more detail in Eth1 HTTP errors (#2383)
## Issue Addressed

NA

## Proposed Changes

Whilst investigating #2372, I [learned](https://github.com/sigp/lighthouse/issues/2372#issuecomment-851725049) that the error message returned from some failed Eth1 requests are always `NotReachable`. This makes debugging quite painful.

This PR adds more detail to these errors. For example:

- Bad infura key: `ERRO Failed to update eth1 cache             error: Failed to update Eth1 service: "All fallback errored: https://mainnet.infura.io/ => EndpointError(RequestFailed(\"Response HTTP status was not 200 OK:  401 Unauthorized.\"))", retry_millis: 60000, service: eth1_rpc`
- Unreachable server: `ERRO Failed to update eth1 cache             error: Failed to update Eth1 service: "All fallback errored: http://127.0.0.1:8545/ => EndpointError(RequestFailed(\"Request failed: reqwest::Error { kind: Request, url: Url { scheme: \\\"http\\\", cannot_be_a_base: false, username: \\\"\\\", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(8545), path: \\\"/\\\", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError(\\\"tcp connect error\\\", Os { code: 111, kind: ConnectionRefused, message: \\\"Connection refused\\\" })) }\"))", retry_millis: 60000, service: eth1_rpc`
- Bad server: `ERRO Failed to update eth1 cache             error: Failed to update Eth1 service: "All fallback errored: http://127.0.0.1:8545/ => EndpointError(RequestFailed(\"Response HTTP status was not 200 OK:  501 Not Implemented.\"))", retry_millis: 60000, service: eth1_rpc`

## Additional Info

NA
2021-06-01 06:59:41 +00:00
..
beacon_chain Use the forwards iterator more often (#2376) 2021-05-31 04:18:20 +00:00
client Monitoring service api (#2251) 2021-05-26 05:58:41 +00:00
eth1 Return more detail in Eth1 HTTP errors (#2383) 2021-06-01 06:59:41 +00:00
eth2_libp2p Minimum Outbound-Only Peers Requirement (#2356) 2021-05-31 04:18:19 +00:00
genesis Add SensitiveUrl to redact user secrets from endpoints (#2326) 2021-05-04 01:59:51 +00:00
http_api Use the forwards iterator more often (#2376) 2021-05-31 04:18:20 +00:00
http_metrics Tune GNU malloc (#2299) 2021-05-28 05:59:45 +00:00
network Use the forwards iterator more often (#2376) 2021-05-31 04:18:20 +00:00
operation_pool Pack attestations into blocks in parallel (#2307) 2021-04-13 05:27:42 +00:00
src Tune GNU malloc (#2299) 2021-05-28 05:59:45 +00:00
store Use the forwards iterator more often (#2376) 2021-05-31 04:18:20 +00:00
tests Update to tokio 1.1 (#2172) 2021-02-10 23:29:49 +00:00
timer Update to tokio 1.1 (#2172) 2021-02-10 23:29:49 +00:00
websocket_server Server sent events (#1920) 2020-12-04 00:18:58 +00:00
Cargo.toml Monitoring service api (#2251) 2021-05-26 05:58:41 +00:00