Repository: unionlabs/union
File: lib/voyager-message/src/context.rs (Rust)

Code before:
                ErrorObject::from(value).into()
            }
        }
    };
}

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
#[error("no module loaded for state on chain `{chain_id}` and IBC version `{ibc_spec_id}`")]
pub struct StateModuleNotFound {
    pub chain_id: ChainId,
    pub ibc_spec_id: IbcSpecId,
}

module_error!(StateModuleNotFound);

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
#[error("no module loaded for proofs on chain `{chain_id}` and IBC version `{ibc_spec_id}`")]
pub struct ProofModuleNotFound {
    pub chain_id: ChainId,
    pub ibc_spec_id: IbcSpecId,
}

module_error!(ProofModuleNotFound);

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
#[error("no module loaded for consensus on chain `{0}`")]
pub struct FinalityModuleNotFound(pub ChainId);

module_error!(FinalityModuleNotFound);

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
#[error(
    "no module loaded for client bootstrapping on chain `{chain_id}` for client type `{client_type}`"
)]
pub struct ClientBootstrapModuleNotFound {
    pub chain_id: ChainId,
    pub client_type: ClientType,
}

module_error!(ClientBootstrapModuleNotFound);

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
pub enum ClientModuleNotFound {
    #[error("no client module loaded for client type `{}`", client_type)]
    ClientTypeNotFound { client_type: ClientType },
    #[error(
        "no client module loaded supporting client type `{client_type}`, IBC interface `{ibc_interface}`, and IBC version `{ibc_spec_id}`"
    )]
    NotFound {
        client_type: ClientType,
        ibc_interface: IbcInterface,

Review comment (suggestion):
```suggestion
#[error("no module loaded for finality on chain `{0}`")]
```

Code after:
                ErrorObject::from(value).into()
            }
        }
    };
}

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
#[error("no module loaded for state on chain `{chain_id}` and IBC version `{ibc_spec_id}`")]
pub struct StateModuleNotFound {
    pub chain_id: ChainId,
    pub ibc_spec_id: IbcSpecId,
}

module_error!(StateModuleNotFound);

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
#[error("no module loaded for proofs on chain `{chain_id}` and IBC version `{ibc_spec_id}`")]
pub struct ProofModuleNotFound {
    pub chain_id: ChainId,
    pub ibc_spec_id: IbcSpecId,
}

module_error!(ProofModuleNotFound);

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
#[error("no module loaded for finality on chain `{0}`")]
pub struct FinalityModuleNotFound(pub ChainId);

module_error!(FinalityModuleNotFound);

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
#[error(
    "no module loaded for client bootstrapping on chain `{chain_id}` for client type `{client_type}`"
)]
pub struct ClientBootstrapModuleNotFound {
    pub chain_id: ChainId,
    pub client_type: ClientType,
}

module_error!(ClientBootstrapModuleNotFound);

#[derive(Debug, Clone, PartialEq, thiserror::Error)]
pub enum ClientModuleNotFound {
    #[error("no client module loaded for client type `{}`", client_type)]
    ClientTypeNotFound { client_type: ClientType },
    #[error(
        "no client module loaded supporting client type `{client_type}`, IBC interface `{ibc_interface}`, and IBC version `{ibc_spec_id}`"
    )]
    NotFound {
        client_type: ClientType,
        ibc_interface: IbcInterface,