homestar_runtime/network/rpc/
error.rs

1//! Error types related to the RPC server / client interface(s).
2
3use serde::{Deserialize, Serialize};
4
5/// Error types related to the RPC server interface.
6#[derive(thiserror::Error, Debug, Serialize, Deserialize)]
7pub enum Error {
8    /// Error when attempting to send data on a channel.
9    #[error("{0}")]
10    FailureToSendOnChannel(String),
11    /// Error when attempting to receive data on a channel.
12    #[error("{0}")]
13    FailureToReceiveOnChannel(String),
14    /// Error when attempting to run a workflow via the [Runner].
15    ///
16    /// [Runner]: crate::Runner
17    #[error("runtime error: {0}")]
18    FromRunner(String),
19}