mirror of
https://github.com/Seldaek/monolog.git
synced 2025-07-31 18:30:15 +02:00
Fixes
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Monolog\Utils;
|
||||
use Monolog\Formatter\FormatterInterface;
|
||||
use Monolog\Formatter\LineFormatter;
|
||||
use Swift_Message;
|
||||
|
@@ -12,6 +12,7 @@
|
||||
namespace Monolog\Handler;
|
||||
|
||||
use Monolog\Logger;
|
||||
use Monolog\Utils;
|
||||
|
||||
/**
|
||||
* Logs to syslog service.
|
||||
|
@@ -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']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user