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
use gcp_bigquery_client::error::BQError;
use thiserror::Error;
use url;

#[derive(Error, Debug)]
pub enum BigQuerySourceError {
    #[error(transparent)]
    ConnectorXError(#[from] crate::errors::ConnectorXError),

    #[error(transparent)]
    BQError(#[from] BQError),

    #[error(transparent)]
    BigQueryUrlError(#[from] url::ParseError),

    #[error(transparent)]
    BigQueryStdError(#[from] std::io::Error),

    #[error(transparent)]
    BigQueryJsonError(#[from] serde_json::Error),

    #[error(transparent)]
    BigQueryParseFloatError(#[from] std::num::ParseFloatError),

    #[error(transparent)]
    BigQueryParseIntError(#[from] std::num::ParseIntError),

    /// Any other errors that are too trivial to be put here explicitly.
    #[error(transparent)]
    Other(#[from] anyhow::Error),
}