| 1 | pub type Result<T> = std::result::Result<T, Error>; |
| 2 | |
| 3 | #[derive(Debug, thiserror::Error)] |
| 4 | pub 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 | } |