Catch exception if user blocked the bot
TheRedEclipse opened this issue · 0 comments
TheRedEclipse commented
PHP version
8.1
irazasyed/telegram-bot-sdk version
3.9
Laravel version (if any)
8
Code To Reproduce the bug
Hello, I trying to catch the error when user blocks the bot. But for some reason on production when I trying to catch an exception I'm gettting Fatal error. Any suggestions how to fix that?
`try {
Telegram::sendMessage($params);
} catch (TelegramResponseException $e) {
'we have got error'
}`
Error stacktrace (if any)
PHP Fatal error: Uncaught Error: Call to undefined function GuzzleHttp\Promise\unwrap() in /vendor/irazasyed/telegram-bot-sdk/src/HttpClients/GuzzleHttpClient.php:50 Stack trace: #0 [internal function]: Telegram\Bot\HttpClients\GuzzleHttpClient->__destruct() #1 {main} thrown in /vendor/irazasyed/telegram-bot-sdk/src/HttpClients/GuzzleHttpClient.php on line 50