bitwarden_exporters/
error.rs

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
use thiserror::Error;

#[derive(Error, Debug)]
pub enum ExportError {
    #[error(transparent)]
    MissingField(#[from] bitwarden_core::MissingFieldError),
    #[error(transparent)]
    VaultLocked(#[from] bitwarden_core::VaultLocked),

    #[error("CSV error: {0}")]
    Csv(#[from] crate::csv::CsvError),
    #[error("Credential Exchange error: {0}")]
    CxpError(#[from] crate::cxp::CxpError),
    #[error("JSON error: {0}")]
    Json(#[from] crate::json::JsonError),
    #[error("Encrypted JSON error: {0}")]
    EncryptedJsonError(#[from] crate::encrypted_json::EncryptedJsonError),

    #[error(transparent)]
    BitwardenError(#[from] bitwarden_core::Error),
    #[error(transparent)]
    BitwardenCryptoError(#[from] bitwarden_crypto::CryptoError),
    #[error(transparent)]
    CipherError(#[from] bitwarden_vault::CipherError),
}