You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consume body passed to post_message(body, url) and update callers.
Fold some long lines while I'm here to improve code readability.
Signed-off-by: Artem Mironov <artem.mironov@absa.africa>
Signed-off-by: Artem Mironov <artem.mironov@absa.africa>
Co-authored-by: Artem Mironov <artem.mironov@absa.africa>
Err(AgencyClientError::from_msg(AgencyClientErrorKind::PostMessageFailed,format!("POST {} failed due to non-success HTTP status: {}, response body: {}", url, response_status, payload)))
75
+
Err(AgencyClientError::from_msg(
76
+
AgencyClientErrorKind::PostMessageFailed,
77
+
format!("POST {} failed due to non-success HTTP status: {}, response body: {}",
78
+
url, response_status, payload)))
75
79
}
76
80
}
77
-
Err(error) => Err(AgencyClientError::from_msg(AgencyClientErrorKind::PostMessageFailed,format!("POST {} failed because response could not be decoded as utf-8, HTTP status: {}, content-length header: {:?}, error: {:?}", url, response_status, content_length, error))),
81
+
Err(error) => Err(AgencyClientError::from_msg(
82
+
AgencyClientErrorKind::PostMessageFailed,
83
+
format!("POST {} failed because response could not be decoded as utf-8, HTTP status: {}, \
84
+
content-length header: {:?}, error: {:?}",
85
+
url, response_status, content_length, error))),
78
86
}
79
87
}
80
88
81
89
fnset_ssl_cert_location(){
82
90
let ssl_cert_file = "SSL_CERT_FILE";
83
-
env::set_var(ssl_cert_file, env::var("EXTERNAL_STORAGE").unwrap() + "/cacert.pem");//TODO: CHANGE ME, HARDCODING FOR TESTING ONLY
Err(e) => error!("couldn't find var in env {}:: {}. This needs to be set on Android to make https calls.\n See https://github.com/seanmonstar/reqwest/issues/70 for more info", ssl_cert_file, e),
97
+
Err(e) => error!("couldn't find var in env {}:: {}. \
98
+
This needs to be set on Android to make https calls.\n\
99
+
See https://github.com/seanmonstar/reqwest/issues/70 for more info",
0 commit comments