1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum FlowError {
5 #[error("Cannot apply extractor {extractor} to event {event}")]
6 ExtractorError { extractor: String, event: String },
7
8 #[error("Websocket error: {0}")]
9 WebSocketError(#[from] tokio_tungstenite::tungstenite::Error),
10
11 #[error("Ill format message: {0}")]
12 FromUtf8Error(#[from] std::string::FromUtf8Error),
13
14 #[error("Json error: {0}")]
15 JsonError(#[from] serde_json::Error),
16
17 #[error("No connection")]
18 NoConnection,
19
20 #[error("No response")]
21 NoResponse,
22}