Print error returned by update hook
@@ -136,7 +136,8 @@ pub fn update_hook(refname: &str, old: &str, new: &str) -> i32 {
.json(&repo_update)
.send();
- if let Ok(mut r) = resp {
+ match resp {
+ Ok(mut r) => {
if r.status().is_success() {
if let Ok(body) = r.text() {
println!("response from upstream:\n {}\n\n", body);
@@ -146,5 +147,9 @@ pub fn update_hook(refname: &str, old: &str, new: &str) -> i32 {
return 0;
}
}
+ Err(err) => {
+ println!("/repo_update request failed {:?}", err);
+ }
+ };
return 1;
}
