Skip to content

Commit

Permalink
Handle candidate error
Browse files Browse the repository at this point in the history
  • Loading branch information
rgodiyal committed May 1, 2024
1 parent 7d832dc commit 98b307c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AddressValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ public function validate(String $client_id, String $client_secret)
return ['status' => 'fail', 'msg' => $error];
}

if (!isset($res->XAVResponse->Candidate)) {
return ['status' => 'fail', 'msg' => "Invalid Address."];
}

$addresses = $this->_getAddresses($res->XAVResponse->Candidate);
return ['status' => 'success', 'addresses' => $addresses];
}
Expand Down

0 comments on commit 98b307c

Please sign in to comment.