use reqwest;
use serde_json;
use serde_json::Value;
use url;
error_chain! {
foreign_links {
Reqwest(reqwest::Error);
SerdeJson(serde_json::Error);
UrlParse(url::ParseError);
}
errors {
Unauthorized {
description("Unauthorized")
display("Unauthorized")
}
UnprocessableEntity(t: Value) {
description("Unprocessable entity")
display("Unprocessable entity: {}", t)
}
UnexpectedStatus(t: reqwest::StatusCode) {
description("Unexpected status code")
display("Unexpected status code: {}", t)
}
NotFound {
description("Not found")
display("Not found")
}
}
}