1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
use thiserror::Error as ThisError;

pub type Result<T, E = Error> = std::result::Result<T, E>;

#[derive(ThisError, Debug)]
pub enum Error {
    #[error("No event to progress")]
    NoEvent,

    #[error("Wrong Properties Type")]
    WrongProps,

    #[error("Base scope has not been mounted yet")]
    NotMounted,

    // #[error("Out of compute credits")]
    // OutOfCredits,

    // /// Used when errors need to propogate but are too unique to be typed
    // #[error("{0}")]
    // Unique(String),

    // #[error("GraphQL error: {0}")]
    // GraphQL(String),

    // // TODO(haze): Remove, or make a better error. This is pretty much useless
    // #[error("GraphQL response mismatch. Got {found} but expected {expected}")]
    // GraphQLMisMatch {
    //     expected: &'static str,
    //     found: String,
    // },

    // #[error("Difference detected in SystemTime! {0}")]
    // SystemTime(#[from] std::time::SystemTimeError),

    // #[error("Failed to parse Integer")]
    // ParseInt(#[from] std::num::ParseIntError),

    // #[error("")]
    // MissingAuthentication,

    // #[error("Failed to create experiment run: {0}")]
    // FailedToCreateExperimentRun(String),

    // #[error("Could not find shared behavior with ID {0}")]
    // MissingSharedBehavior(String),
    #[error("I/O Error: {0}")]
    IO(#[from] std::io::Error),
}