BlueGit

ict rusty-teams

Files

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

error.rs

eba4ad94 History
error.rs 522 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("cannot upload an empty file")]
14 EmptyUpload,
15 #[error("upload failed: {0}")]
16 Upload(String),
17}