Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch exception if user blocked the bot #1121

Open
TheRedEclipse opened this issue Mar 15, 2024 · 0 comments
Open

Catch exception if user blocked the bot #1121

TheRedEclipse opened this issue Mar 15, 2024 · 0 comments
Labels

Comments

@TheRedEclipse
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant