use frame_support::sp_runtime::DispatchError;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum SessionError {
#[error("Encoding call data failed: {0}")]
Encoding(String),
#[error("Decoding call data failed: {0}")]
Decoding(String),
#[error("{0:?}")]
Drink(#[from] crate::Error),
#[error("Contract deployment has been reverted")]
DeploymentReverted,
#[error("Contract deployment failed before execution: {0:?}")]
DeploymentFailed(DispatchError),
#[error("Code upload failed: {0:?}")]
UploadFailed(DispatchError),
#[error("Contract call has been reverted")]
CallReverted,
#[error("Contract call failed before execution: {0:?}")]
CallFailed(DispatchError),
#[error("No deployed contract")]
NoContract,
#[error("Missing transcoder")]
NoTranscoder,
}