From b3e9912fd81a48fc85323fa204442aaca4f8ae05 Mon Sep 17 00:00:00 2001 From: amikhaylov Date: Thu, 28 May 2026 11:56:23 +0300 Subject: [PATCH] fixed VkApiClient --- app/Library/VK/VkApiClient.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Library/VK/VkApiClient.php b/app/Library/VK/VkApiClient.php index 5132f6a..b78f386 100644 --- a/app/Library/VK/VkApiClient.php +++ b/app/Library/VK/VkApiClient.php @@ -29,10 +29,12 @@ final class VkApiClient ]), ]); + $result = json_decode($response->getBody()->getContents(), true); + if (isset($result['error'])) { throw new Exception("VK API Error: " . $result['error']['error_msg']); } - return json_decode($response->getBody()->getContents(), true); + return $result; } }