1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-31 18:30:15 +02:00
This commit is contained in:
Jordi Boggiano
2022-03-14 13:35:56 +01:00
parent c02d86ffb2
commit b886d70a35
3 changed files with 4 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
namespace Monolog\Handler;
use Monolog\Logger;
use Monolog\Utils;
use Monolog\Formatter\FormatterInterface;
use Monolog\Formatter\LineFormatter;
use Swift_Message;

View File

@@ -12,6 +12,7 @@
namespace Monolog\Handler;
use Monolog\Logger;
use Monolog\Utils;
/**
* Logs to syslog service.

View File

@@ -248,12 +248,12 @@ class TelegramBotHandler extends AbstractProcessingHandler
$result = Curl\Util::execute($ch);
if (!is_string($result)) {
throw new RuntimeException('Telegram API error. Description: No response' . Utils::getRecordMessageForException($record));
throw new RuntimeException('Telegram API error. Description: No response');
}
$result = json_decode($result, true);
if ($result['ok'] === false) {
throw new RuntimeException('Telegram API error. Description: ' . $result['description'] . Utils::getRecordMessageForException($record));
throw new RuntimeException('Telegram API error. Description: ' . $result['description']);
}
}