Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
katyxa committed Apr 17, 2018
1 parent b25888e commit 91d93bf
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 91d93bf

Please sign in to comment.