From 8761205b175222015942228e1615744a650edf43 Mon Sep 17 00:00:00 2001 From: David Alexa Date: Fri, 13 Nov 2020 15:12:13 +0100 Subject: [PATCH] osetreni lgoovani v pripadu vypadku API --- src/Balikobot/Balikobot.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Balikobot/Balikobot.php b/src/Balikobot/Balikobot.php index 0827f68..aaba266 100644 --- a/src/Balikobot/Balikobot.php +++ b/src/Balikobot/Balikobot.php @@ -1586,8 +1586,10 @@ private function call($request, $shipper, array $data = [], $url = null) $jsonRes = json_decode($response, true); if (is_null($jsonRes)) { $jsonRes = []; + $this->logger->critical('Result of ' . $targetUrl, $jsonRes); + } else { + $this->logger->info('Result of ' . $targetUrl, $jsonRes); } - $this->logger->info('Result of ' . $targetUrl, $jsonRes); return json_decode($response, true); }