diff options
author | Harald Musum <musum@yahoo-inc.com> | 2016-09-08 14:15:09 +0200 |
---|---|---|
committer | Harald Musum <musum@yahoo-inc.com> | 2016-09-08 14:15:09 +0200 |
commit | 3ff2798746024c5147c1ee7f188a3e6971f7c4ac (patch) | |
tree | cb7d956c9a8780659a7522afff9943de1db8796d /config-model/src/main | |
parent | ec5d6bc110c72a32d4d3ad8c2e7d7b3cf7ef247d (diff) |
Fix error message when curl fails
* Print correct message depending on exitcode and status code
Diffstat (limited to 'config-model/src/main')
-rwxr-xr-x | config-model/src/main/perl/deploy | 10 |
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); } |