summaryrefslogtreecommitdiffstats
path: root/config-model/src/main/perl
diff options
context:
space:
mode:
authorHarald Musum <musum@yahoo-inc.com>2016-09-08 14:15:09 +0200
committerHarald Musum <musum@yahoo-inc.com>2016-09-08 14:15:09 +0200
commit3ff2798746024c5147c1ee7f188a3e6971f7c4ac (patch)
treecb7d956c9a8780659a7522afff9943de1db8796d /config-model/src/main/perl
parentec5d6bc110c72a32d4d3ad8c2e7d7b3cf7ef247d (diff)
Fix error message when curl fails
* Print correct message depending on exitcode and status code
Diffstat (limited to 'config-model/src/main/perl')
-rwxr-xr-xconfig-model/src/main/perl/deploy10
1 files changed, 8 insertions, 2 deletions
diff --git a/config-model/src/main/perl/deploy b/config-model/src/main/perl/deploy
index d62e678c2fb..6c165951ab0 100755
--- a/config-model/src/main/perl/deploy
+++ b/config-model/src/main/perl/deploy
@@ -391,8 +391,14 @@ sub http_upload {
print_request_failed($exitcode, $configsource_url_used);
print "Retrying with another config server\n";
} else {
- print_request_failed($exitcode, $configsource_url_used);
- exit 1;
+ if ($exitcode != 0) {
+ print_request_failed($exitcode, $configsource_url_used);
+ exit 1;
+ } else { # Non-200 HTTP status code
+ print "Request failed. HTTP status code: $status_code\n";
+ print_response($response);
+ exit 1;
+ }
}
} while ($retry);
}