botman / botman/driver-telegram
Add new exceptions: bot was blocked by the user, chat not found
- Dominant language
- PHP
- Stars
- 94
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
It would be cool not to handle such errors manually.
Here is an example of Telegram response after trying to send a message to a user that blocked your bot:
`HTTP 403`
```json
{
"ok": false,
"error_code": 403,
"description": "Forbidden: bot was blocked by the user"
}
```
Chat doesn't exist (i.e. user doesn't exist):
`HTTP 400`
```json
{
"ok": false,
"error_code": 400,
"description": "Bad Request: chat not found"
}
```
Contributor guide
Research direction
Start by locating how this Telegram driver handles API error responses and existing exception classes. Use the two responses in the issue as cases to trace, and consider the work complete when blocked-bot and chat-not-found errors are represented by dedicated exceptions rather than requiring manual handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100