yandex: Check for presence of success, not lack of error
This is more resilient to bugs.
This commit is contained in:
parent
f807ba58ac
commit
459970c5e3
1 changed files with 2 additions and 2 deletions
|
@ -6259,7 +6259,7 @@ sub nic_yandex_update {
|
|||
# Strip header
|
||||
$reply =~ s/^.*?\n\n//s;
|
||||
my $response = eval { decode_json($reply) };
|
||||
if ($response->{success} eq 'error') {
|
||||
if ($response->{success} ne 'ok') {
|
||||
failed("%s", $response->{error});
|
||||
next;
|
||||
}
|
||||
|
@ -6296,7 +6296,7 @@ sub nic_yandex_update {
|
|||
# Strip header
|
||||
$reply =~ s/^.*?\n\n//s;
|
||||
$response = eval { decode_json($reply) };
|
||||
if ($response->{success} eq 'error') {
|
||||
if ($response->{success} ne 'ok') {
|
||||
failed("%s", $response->{error});
|
||||
next;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue