reth
reth copied to clipboard
Impl From<ValidationApiError> for ErrorObject
trafficstars
Describe the feature
we currently always return this error as internal:
https://github.com/paradigmxyz/reth/blob/ae3ffb90e4c99dd16e8bf6c5a9749c2f0cf9ec68/crates/rpc/rpc/src/validation.rs#L444-L444
however this can fail if params are wrong
https://github.com/paradigmxyz/reth/blob/ae3ffb90e4c99dd16e8bf6c5a9749c2f0cf9ec68/crates/rpc/rpc/src/validation.rs#L527-L539
we need a more detailed conversion into jsonrpsee_types::error::ErrorObject<'static>
see also:
https://github.com/paradigmxyz/reth/blob/ae3ffb90e4c99dd16e8bf6c5a9749c2f0cf9ec68/crates/rpc/rpc-eth-types/src/error/mod.rs#L171-L172
TODO
- impl from conversion for
ErrorObjectreturn invalid params for param related errors
Additional context
No response