Skip to main content

classify_evm_error

Function classify_evm_error 

Source
pub fn classify_evm_error(error: &EvmToolError) -> ErrorClass
Expand description

Classify EVM errors to determine retry behavior

This function uses structured error variants to determine classification, with a fallback to string matching for provider errors that contain generic messages.

§Examples

ⓘ
let error = EvmToolError::NonceTooLow;
assert_eq!(classify_evm_error(&error), ErrorClass::Retriable);

let error = EvmToolError::InsufficientFunds;
assert_eq!(classify_evm_error(&error), ErrorClass::Permanent);