We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ecfb869 + 7163114 commit c3b7395Copy full SHA for c3b7395
lib/Api/Customer.php
@@ -47,6 +47,10 @@ public function getCustomerByEmail(string $customerEmail): array
47
{
48
$customers = $this->getListCustomersByEmail($customerEmail);
49
50
+ if (count($customers) === 0) {
51
+ throw new \LogicException(sprintf('customer with email %s not found', $customerEmail));
52
+ }
53
+
54
return $this->getCustomerById($customers[0]['customer_id']);
55
}
56
0 commit comments