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