mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-24 12:15:55 +01:00
Rebuild everything, becuase it makes it easier to compare everything to my changes
This commit is contained in:
@@ -164,7 +164,7 @@
|
||||
//!
|
||||
//! ## Optional Parts in Server-Requests
|
||||
//!
|
||||
//! All structures provided by this library are made to be [enocodable](trait.RequestValue.html) and
|
||||
//! All structures provided by this library are made to be [encodable](trait.RequestValue.html) and
|
||||
//! [decodable](trait.ResponseResult.html) via *json*. Optionals are used to indicate that partial requests are responses
|
||||
//! are valid.
|
||||
//! Most optionals are are considered [Parts](trait.Part.html) which are identifiable by name, which will be sent to
|
||||
@@ -950,9 +950,15 @@ impl<'a, C, A> TaskqueueGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A:
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -1223,9 +1229,15 @@ impl<'a, C, A> TaskLeaseCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -1531,9 +1543,15 @@ impl<'a, C, A> TaskInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -1793,9 +1811,15 @@ impl<'a, C, A> TaskDeleteCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -2071,9 +2095,15 @@ impl<'a, C, A> TaskPatchCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oau
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -2350,9 +2380,15 @@ impl<'a, C, A> TaskListCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oaut
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -2604,9 +2640,15 @@ impl<'a, C, A> TaskGetCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oauth
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
@@ -2892,9 +2934,15 @@ impl<'a, C, A> TaskUpdateCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
|
||||
if !res.status.is_success() {
|
||||
let mut json_err = String::new();
|
||||
res.read_to_string(&mut json_err).unwrap();
|
||||
|
||||
let json_server_error = json::from_str::<JsonServerError>(&json_err).ok();
|
||||
let server_error = json::from_str::<ServerError>(&json_err)
|
||||
.or_else(|_| json::from_str::<ErrorResponse>(&json_err).map(|r| r.error))
|
||||
.ok();
|
||||
|
||||
if let oauth2::Retry::After(d) = dlg.http_failure(&res,
|
||||
json::from_str(&json_err).ok(),
|
||||
json::from_str(&json_err).ok()) {
|
||||
json_server_error,
|
||||
server_error) {
|
||||
sleep(d);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user