Fix for error in user list.

This commit is contained in:
Alexey Skobkin 2017-01-14 04:35:44 +03:00
parent 3edd3df3b1
commit 2d8bd6f6fc
1 changed files with 6 additions and 0 deletions

View File

@ -293,6 +293,12 @@ class UserApi extends AbstractApi
{
$this->logger->debug('Trying to create multiple users from array', ['array' => $users]);
if (array_key_exists('error', $users)) {
$this->logger->error('User list contains error object', ['error' => $users['error']]);
throw new ApiException('User list response contains error object');
}
/** @var User[] $resultUsers */
$resultUsers = [];