Skip to content

Commit

Permalink
Merge pull request #24 from KateAAAA/yandex__direct_errors
Browse files Browse the repository at this point in the history
fix yandex direct erorrs info
  • Loading branch information
SonicGD authored Apr 17, 2018
2 parents b25888e + 91d93bf commit 47a3a97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DirectApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,12 +429,12 @@ public function doRequest(RequestInterface $request, int $try = 0, int $maxTry =
if ($try < $maxTry) {
$response = $this->doRequest($request, $try);
} else {
throw new DirectApiException('Ошибка при отправке запроса к яндексу: ' . $exception->getMessage());
throw new DirectApiException('Ошибка при подключении к яндексу: ' . $exception->getMessage() . ' Code: ' . $exception->getCode());
}
} catch (RequestException $exception) {
throw new DirectApiException('Ошибка при отправке запроса к яндексу: ' . $exception->getMessage());
throw new DirectApiException('Ошибка при отправке запроса к яндексу: ' . $exception->getMessage() . '. Response: ' . $exception->getResponse()->getBody()->getContents() . ' Code: ' . $exception->getCode());
} catch (\Throwable $exception) {
throw new DirectApiException('Ошибка при отправке запроса к яндексу' . $exception->getMessage());
throw new DirectApiException('Ошибка при запросе к яндексу' . $exception->getMessage() . ' Code: ' . $exception->getCode());
}
return $response;
}
Expand Down

0 comments on commit 47a3a97

Please sign in to comment.