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

idea: Create a special Exception class for cases when bot is blocked by a user #1147

Open
alies-dev opened this issue Nov 17, 2024 · 0 comments
Labels

Comments

@alies-dev
Copy link
Contributor

alies-dev commented Nov 17, 2024

Why: it will simplify exception processing (by class, instead of description/message what is a bad practice)

Exception (this is everything what I have about this special case):

CleanShot 2024-11-17 at 20 00 03@2x

or text version:

 Telegram\Bot\Exceptions\TelegramResponseException 

  Forbidden: bot was blocked by the user

  at vendor/irazasyed/telegram-bot-sdk/src/Exceptions/TelegramResponseException.php:59
     55▕             $message = $data['description'] ?? 'Unknown error from API.';
     56▕         }
     57▕ 
     58▕         // Others
  ➜  59▕         return new self($response, new TelegramOtherException($message, $code));
     60▕     }

Error stacktrace (if any)

No response

@alies-dev alies-dev added the bug label Nov 17, 2024
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