clickhouse_http_client/
error.rs1use std::io::Error as IoError;
2
3use isahc::http;
4
5#[derive(thiserror::Error, Debug)]
6pub enum Error {
7 #[error("IsahcError {0:?}")]
8 IsahcError(#[from] isahc::Error),
9 #[error("HttpInvalidUri {0:?}")]
10 HttpInvalidUri(#[from] http::uri::InvalidUri),
11 #[error("UrlParseError {0:?}")]
12 UrlParseError(#[from] url::ParseError),
13 #[error("IoError {0:?}")]
14 IoError(#[from] IoError),
15 #[error("ClientExecuteError {0:?}")]
17 ClientExecuteError(#[from] ClientExecuteError),
18 #[error("ClientInsertWithFormatError {0:?}")]
19 ClientInsertWithFormatError(#[from] ClientInsertWithFormatError),
20 #[error("ClientSelectWithFormatError {0:?}")]
21 ClientSelectWithFormatError(#[from] ClientSelectWithFormatError),
22}
23
24#[derive(thiserror::Error, Debug)]
25pub enum ClientExecuteError {
26 #[error("StatusCodeMismatch {0:?}")]
27 StatusCodeMismatch(http::StatusCode),
28}
29
30#[derive(thiserror::Error, Debug)]
31pub enum ClientInsertWithFormatError {
32 #[error("FormatSerError {0:?}")]
33 FormatSerError(String),
34 #[error("StatusCodeMismatch {0:?}")]
35 StatusCodeMismatch(http::StatusCode),
36}
37
38#[derive(thiserror::Error, Debug)]
39pub enum ClientSelectWithFormatError {
40 #[error("StatusCodeMismatch {0:?}")]
41 StatusCodeMismatch(http::StatusCode),
42 #[error("FormatMismatch {0:?}")]
43 FormatMismatch(String),
44 #[error("FormatDeError {0:?}")]
45 FormatDeError(String),
46}