enigma_sfu/
error.rs

1use thiserror::Error;
2
3pub type Result<T> = std::result::Result<T, SfuError>;
4
5#[derive(Clone, Debug, Error, PartialEq, Eq)]
6pub enum SfuError {
7    #[error("invalid id: {0}")]
8    InvalidId(String),
9    #[error("room not found")]
10    RoomNotFound,
11    #[error("participant not found")]
12    ParticipantNotFound,
13    #[error("track not found")]
14    TrackNotFound,
15    #[error("already exists")]
16    AlreadyExists,
17    #[error("operation not allowed")]
18    NotAllowed,
19    #[error("internal error: {0}")]
20    Internal(String),
21}