-
-
Notifications
You must be signed in to change notification settings - Fork 243
Expand file tree
/
Copy pathmod.rs
More file actions
25 lines (20 loc) · 807 Bytes
/
mod.rs
File metadata and controls
25 lines (20 loc) · 807 Bytes
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
mod api_error;
mod sentry_error;
pub(super) use api_error::{ApiError, ApiErrorKind};
pub(super) use sentry_error::SentryError;
use crate::api::ApiResponse;
#[derive(Clone, Debug, thiserror::Error)]
#[error("project was renamed to '{0}'\nPlease use this slug in your .sentryclirc file, sentry.properties file or in the CLI --project parameter")]
pub(super) struct ProjectRenamedError(pub(super) String);
/// Shortcut alias for results of this module.
pub(super) type ApiResult<T> = Result<T, ApiError>;
#[derive(Debug, thiserror::Error)]
pub(super) enum RetryError {
#[error("request failed with retryable status code {}", body.status)]
Status { body: ApiResponse },
#[error("request failed with retryable error: {source}")]
ApiError {
#[from]
source: ApiError,
},
}