From 8f3cc468b988f7d41ff83f50cb94093d05cb1d9b Mon Sep 17 00:00:00 2001 From: amikhaylov Date: Thu, 28 May 2026 12:16:06 +0300 Subject: [PATCH] fixed VkApiClient --- app/Library/VK/VkApiClient.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;