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 http::Method;

#[derive(thiserror::Error, Debug)]
pub enum Error {
	#[error("Generic error: {0}")]
	Generic(String),

	#[error("Static error: {0}")]
	Static(&'static str),

	#[error("Method not supported for client.do_push (only POST, PUSH, PATCH). Was: {given_method}")]
	NotSupportedMethodForPush { given_method: Method },

	#[error("Not Json value at json pointer: {json_pointer}")]
	NoJsonValueFound { json_pointer: String },

	#[error(transparent)]
	IO(#[from] std::io::Error),

	#[error(transparent)]
	Reqwest(#[from] reqwest::Error),

	#[error(transparent)]
	SerdeJson(#[from] serde_json::Error),
}