Conversation
|
Claude finished @iamquang95's task in 2m 33s —— View job Code Review:
|
|
|
||
| fn decode_fixed_hex<const N: usize>(value: &str) -> Result<[u8; N], EthBeaconNodeApiClientError> { | ||
| let value = value.strip_prefix("0x").unwrap_or(value); | ||
| let bytes = hex::decode(value).map_err(|_| EthBeaconNodeApiClientError::UnexpectedType)?; |
There was a problem hiding this comment.
I see there are few EthBeaconNodeApiClientError::UnexpectedType returned in this file. Aren't they rather parsing errors? I would introduce new error type with a string member to write more about which parsing step failed.
Fix: #168