gandi: Don't ignore HTTP response code

This commit is contained in:
Richard Hansen 2024-07-28 01:08:42 -04:00
parent 325eb10536
commit 12d5539abc

View file

@ -6924,7 +6924,7 @@ sub nic_gandi_update {
headers => $headers,
method => 'GET',
);
my $ok = header_ok($h, $reply);
next if !header_ok($h, $reply);
$reply =~ s/^.*?\n\n//s;
my $response = eval { decode_json($reply) };
if (!defined($response)) {
@ -6951,7 +6951,7 @@ sub nic_gandi_update {
method => 'PUT',
data => $data,
);
$ok = header_ok($h, $reply);
my $ok = header_ok($h, $reply);
if ($ok) {
$config{$h}{'ip'} = $ip;
$config{$h}{'mtime'} = $now;