neo3/neo_protocol/
protocol_error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum ProtocolError {
5	#[error("RPC responses error: {error}")]
6	RpcResponse { error: String },
7	#[error("Invocation fault state: {error}")]
8	InvocationFaultState { error: String },
9	#[error("Client connection error: {message}")]
10	ClientConnection { message: String },
11	#[error("Cannot cast {item} to {target}")]
12	StackItemCast { item: String, target: String },
13	#[error("Illegal state: {message}")]
14	IllegalState { message: String },
15	#[error("HTTP error: {0}")]
16	HttpError(#[from] reqwest::Error),
17}