Skip to content

Commit 5f3f704

Browse files
committed
cleanup error messages
1 parent a946116 commit 5f3f704

File tree

1 file changed

+6
-3
lines changed
  • plugins/plugins-available/node-control/lib/Thruk/NodeControl

1 file changed

+6
-3
lines changed

plugins/plugins-available/node-control/lib/Thruk/NodeControl/Utils.pm

+6-3
Original file line numberDiff line numberDiff line change
@@ -1538,6 +1538,9 @@ sub _convert_ansible_script_result {
15381538
sub _die_connection_error {
15391539
my($peer, $http_err, $ssh_err) = @_;
15401540

1541+
_debug("http(s) connection failed\n".$http_err) if $http_err;
1542+
_debug("ssh connection failed\n".$ssh_err) if $ssh_err;
1543+
15411544
if(($http_err//'') =~ m/^OMD:/mx) {
15421545
die($http_err."\nssh failed: ".$ssh_err) if $ssh_err;
15431546
die($http_err);
@@ -1555,9 +1558,9 @@ sub _die_connection_error {
15551558
die($http_err);
15561559
}
15571560

1558-
die("http(s) and ssh connection failed\nhttp(s):\n".$http_err."\n\nssh:\n".$ssh_err) if($http_err && $ssh_err);
1559-
die("http(s) connection failed\n".$http_err) if $http_err;
1560-
die("ssh connection failed\n".$ssh_err) if $ssh_err;
1561+
die("http(s) and ssh connection failed\nhttp(s):\n"._strip_line($http_err)."\n\nssh:\n"._strip_line($ssh_err)) if($http_err && $ssh_err);
1562+
die("http(s) connection failed\n"._strip_line($http_err)) if $http_err;
1563+
die("ssh connection failed\n"._strip_line($ssh_err)) if $ssh_err;
15611564
die("no http(s) control connection available.\n");
15621565
}
15631566

0 commit comments

Comments
 (0)