diff options
author | fx <[email protected]> | 2023-10-19 09:39:28 +0200 |
---|---|---|
committer | fx <[email protected]> | 2023-10-19 09:39:28 +0200 |
commit | eb0a092fc53964e02a09da2d92a1f8a3042a1360 (patch) | |
tree | 4f5bdf69e4973dad81506a60760417c1132e6e75 /src/main.rs | |
parent | 527d2c7abc1f83f76342fa21a8d4f417582d53a6 (diff) | |
download | webol-cli-eb0a092fc53964e02a09da2d92a1f8a3042a1360.tar webol-cli-eb0a092fc53964e02a09da2d92a1f8a3042a1360.tar.gz webol-cli-eb0a092fc53964e02a09da2d92a1f8a3042a1360.zip |
added error message on server != 200
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index d2f0c3a..e6ca3ef 100644 --- a/src/main.rs +++ b/src/main.rs | |||
@@ -3,6 +3,7 @@ use config::SETTINGS; | |||
3 | use error::CliError; | 3 | use error::CliError; |
4 | use requests::{start::start, get::get}; | 4 | use requests::{start::start, get::get}; |
5 | use reqwest::header::{HeaderMap, HeaderValue}; | 5 | use reqwest::header::{HeaderMap, HeaderValue}; |
6 | use serde::Deserialize; | ||
6 | 7 | ||
7 | mod config; | 8 | mod config; |
8 | mod error; | 9 | mod error; |
@@ -58,3 +59,8 @@ fn default_headers() -> Result<HeaderMap, CliError> { | |||
58 | Ok(map) | 59 | Ok(map) |
59 | 60 | ||
60 | } | 61 | } |
62 | |||
63 | #[derive(Debug, Deserialize)] | ||
64 | struct ErrorResponse { | ||
65 | error: String | ||
66 | } | ||