aboutsummaryrefslogtreecommitdiff
path: root/src/k2v-client/src/error.rs
blob: 62357934f0a29a4cd45a942a86ba2a1fedf659dc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use std::borrow::Cow;

use thiserror::Error;

/// Errors returned by this crate
#[derive(Error, Debug)]
pub enum Error {
	#[error("received invalid response: {0}")]
	InvalidResponse(Cow<'static, str>),
	#[error("not found")]
	NotFound,
	#[error("io error: {0}")]
	IoError(#[from] std::io::Error),
	#[error("rusoto tls error: {0}")]
	RusotoTls(#[from] rusoto_core::request::TlsError),
	#[error("rusoto http error: {0}")]
	RusotoHttp(#[from] rusoto_core::HttpDispatchError),
	#[error("deserialization error: {0}")]
	Deserialization(#[from] serde_json::Error),
	#[error("{0}")]
	Message(Cow<'static, str>),
}