nfsn: Include host in failure message
This commit is contained in:
parent
ef8bf634fe
commit
58c6caa5ff
1 changed files with 3 additions and 3 deletions
|
@ -4758,13 +4758,13 @@ sub nic_nfsn_handle_error {
|
||||||
$resp =~ s/^.*?\n\n//s; # Strip header
|
$resp =~ s/^.*?\n\n//s; # Strip header
|
||||||
my $json = eval { decode_json($resp) };
|
my $json = eval { decode_json($resp) };
|
||||||
if ($@ || ref($json) ne 'HASH' || not defined $json->{'error'}) {
|
if ($@ || ref($json) ne 'HASH' || not defined $json->{'error'}) {
|
||||||
failed("Invalid error response: %s", $resp);
|
failed("$h: Invalid error response: $resp");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
failed("%s", $json->{'error'});
|
failed("%s", $json->{'error'});
|
||||||
if (defined $json->{'debug'}) {
|
if (defined $json->{'debug'}) {
|
||||||
failed("%s", $json->{'debug'});
|
failed("$h: $json->{'debug'}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4833,7 +4833,7 @@ sub nic_nfsn_update {
|
||||||
'POST', $rm_body);
|
'POST', $rm_body);
|
||||||
if (!header_ok($h, $rm_resp)) {
|
if (!header_ok($h, $rm_resp)) {
|
||||||
$config{$h}{'status'} = 'failed';
|
$config{$h}{'status'} = 'failed';
|
||||||
nic_nfsn_handle_error($rm_resp);
|
nic_nfsn_handle_error($rm_resp, $h);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue