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/. */
45use thiserror::Error;
67#[derive(Error, Debug)]
8pub enum RestmailClientError {
9#[error("Not a restmail account (doesn't end with @restmail.net)")]
10NotARestmailEmail,
11#[error("Max tries reached and the email couldn't be found.")]
12HitRetryMax,
13#[error("JSON error: {0}")]
14JsonError(#[from] serde_json::Error),
15#[error("Error parsing URL: {0}")]
16Disconnect(#[from] url::ParseError),
17#[error("Network error: {0}")]
18RequestError(#[from] viaduct::Error),
19}