1use std::env::VarError;
2
3use crate::futures_channel::mpsc::TrySendError;
4use thiserror::Error;
5use tokio_tungstenite::tungstenite::Message;
6#[derive(Error, Debug)]
7pub enum ZError {
8 #[error("resp struct fmt had been change, not found hash key {0}")]
9 RespFmtError(String),
10
11 #[error("sr result status failed!status={status:?}, msg={msg:?}")]
12 StatusError { status: String, msg: String },
13
14 #[error("ali-nls token get empty!set a config-file named *.env* in proj's root path")]
15 AuthError(#[from] VarError),
16
17 #[error("connect to ali-nls server failed!always because of the `ALI_TOKEN` not correct")]
18 WsConnectError(#[from] tokio_tungstenite::tungstenite::Error),
19
20 #[error("sr result status failed!")]
21 SenderError(#[from] TrySendError<Message>),
22}