From 58c6caa5ffecdeb402a2f3fabcef6d9da610b2b1 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 20 Jul 2024 18:16:08 -0400 Subject: [PATCH] nfsn: Include host in failure message --- ddclient.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ddclient.in b/ddclient.in index 3228b5d..1c71d54 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4758,13 +4758,13 @@ sub nic_nfsn_handle_error { $resp =~ s/^.*?\n\n//s; # Strip header my $json = eval { decode_json($resp) }; if ($@ || ref($json) ne 'HASH' || not defined $json->{'error'}) { - failed("Invalid error response: %s", $resp); + failed("$h: Invalid error response: $resp"); return; } failed("%s", $json->{'error'}); if (defined $json->{'debug'}) { - failed("%s", $json->{'debug'}); + failed("$h: $json->{'debug'}"); } } @@ -4833,7 +4833,7 @@ sub nic_nfsn_update { 'POST', $rm_body); if (!header_ok($h, $rm_resp)) { $config{$h}{'status'} = 'failed'; - nic_nfsn_handle_error($rm_resp); + nic_nfsn_handle_error($rm_resp, $h); next; } }