BlueGit

ict rusty-teams

Files

rusty-teams / crates / graph / src / error.rs

error.rs

error.rs 647 B Download Raw
1pub type Result<T> = std::result::Result<T, Error>;
2
3#[derive(Debug, thiserror::Error)]
4pub enum Error {
5 #[error(transparent)]
6 Session(#[from] session::Error),
7 #[error("unexpected Graph answer: {0}")]
8 Parse(#[from] serde_json::Error),
9 #[error("refusing to follow a next link outside Graph")]
10 ForeignNextLink,
11 #[error("cannot decode a binary answer: {0}")]
12 Decode(String),
13 #[error("you are not a member of this chat")]
14 NotAMember,
15 #[error("cannot upload an empty file")]
16 EmptyUpload,
17 #[error("upload failed: {0}")]
18 Upload(String),
19 #[error("download failed: {0}")]
20 Download(String),
21}