diff options
author | Ferris Tseng <ferristseng@fastmail.fm> | 2018-06-27 00:22:50 -0400 |
---|---|---|
committer | Ferris Tseng <ferristseng@fastmail.fm> | 2018-06-27 00:22:50 -0400 |
commit | 148b989784b47a4034ff82be1760e73a1429dbeb (patch) | |
tree | bc9acc23d403c4c5307ad1cf6b4765a94dacdd9c /ipfs-api/src/response/error.rs | |
parent | 90d3c0a8bb552c249bffb67d20b06869a24bd0a8 (diff) |
get ipfs-api compiling
Diffstat (limited to 'ipfs-api/src/response/error.rs')
-rw-r--r-- | ipfs-api/src/response/error.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ipfs-api/src/response/error.rs b/ipfs-api/src/response/error.rs index 7075def..4cdd1c1 100644 --- a/ipfs-api/src/response/error.rs +++ b/ipfs-api/src/response/error.rs @@ -6,6 +6,7 @@ // copied, modified, or distributed except according to those terms. // +use http; use hyper; use serde_json; use serde_urlencoded; @@ -20,10 +21,11 @@ pub struct ApiError { error_chain! { foreign_links { - Http(hyper::error::Error); + Client(hyper::Error); + Http(http::Error); Parse(serde_json::Error); ParseUtf8(FromUtf8Error); - Url(hyper::error::UriError); + Url(http::uri::InvalidUri); Io(::std::io::Error); EncodeUrl(serde_urlencoded::ser::Error); } @@ -43,6 +45,13 @@ error_chain! { display("api returned an error while streaming: '{}'", err) } + /// API returned a trailer header with unrecognized value. + /// + UnrecognizedTrailerHeader(value: String) { + description("api returned a trailer header with an unknown value"), + display("api returned a trailer header with value: '{}'", value) + } + Uncategorized(err: String) { description("api returned an unknown error"), display("api returned '{}'", err) |