} else { yield CustomerException::CUSTOMER_IS_INACTIVE =>
[ 'exception' => CustomerException::
inactiveCustomer('id-1'
),
'statusCode' => Response::HTTP_UNAUTHORIZED,
'errorCode' => CustomerException::CUSTOMER_OPTIN_NOT_COMPLETED,
'message' => 'The customer with the id "id-1" has not completed the opt-in.',
];
} yield CustomerException::CUSTOMER_OPTIN_NOT_COMPLETED =>
[ 'exception' => CustomerException::
customerOptinNotCompleted('id-1'
),
'statusCode' => Response::HTTP_UNAUTHORIZED,
'errorCode' => CustomerException::CUSTOMER_OPTIN_NOT_COMPLETED,
'message' => 'The customer with the id "id-1" has not completed the opt-in.',
];
yield CustomerException::CUSTOMER_AUTH_THROTTLED =>
[ 'exception' => CustomerException::
customerAuthThrottledException(100
),
'statusCode' => Response::HTTP_TOO_MANY_REQUESTS,
'errorCode' => CustomerException::CUSTOMER_AUTH_THROTTLED,
'message' => 'Customer auth throttled for 100 seconds.',
];