diff --git a/app/Library/VK/VkApiClient.php b/app/Library/VK/VkApiClient.php index b78f386..e061759 100644 --- a/app/Library/VK/VkApiClient.php +++ b/app/Library/VK/VkApiClient.php @@ -3,6 +3,7 @@ namespace App\Library\VK; use Exception; +use Illuminate\Support\Facades\Log; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\GuzzleException; @@ -32,7 +33,9 @@ final class VkApiClient $result = json_decode($response->getBody()->getContents(), true); if (isset($result['error'])) { - throw new Exception("VK API Error: " . $result['error']['error_msg']); + $message = "VK API Error: " . $result['error']['error_msg']; + Log::error($message); + throw new Exception($message); } return $result;