dump/
error.rs

1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5use thiserror::Error;
6
7pub type Result<T> = anyhow::Result<T>;
8
9#[derive(Error, Debug)]
10pub enum RemoteSettingsError {
11    #[error("Network error: {0}")]
12    Network(#[from] reqwest::Error),
13    #[error("IO error: {0}")]
14    IO(#[from] std::io::Error),
15    #[error("JSON error: {0}")]
16    Json(#[from] serde_json::Error),
17    #[error("Cannot find local dump: {0}")]
18    Path(String),
19    #[error("Attachment error: {0}")]
20    Attachment(String),
21}