-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
What kind of feature are you missing? Where do you notice a shortcoming of PTB?
We currently only have NetworkError and TimeoutError(NetworkError) to indicate exceptions that are due to natworking problems (in contrast to exceptions issued by TG). This is not very fine grained and can make advanced exception handling difficult.
Describe the solution you'd like
I'd like to add more subclasses. Looking it httpx, they have a large number of them. Not all of them add much value for us IMO. In the following I list all of the httpx excetpions and check the ones that I think would make sense to have for us:
- HTTPError
- RequestError
- TransportError
- TimeoutException ( (corresponds to
tg.TimeoutError)- ConnectTimeout
- ReadTimeout
- WriteTimeout
- PoolTimeout
- NetworkError (corresponds to
tg.NetworkError)- ConnectError
- ReadError
- WriteError
- CloseError
- ProtocolError
- LocalProtocolError
- RemoteProtocolError
- ProxyError
- UnsupportedProtocol
- TimeoutException ( (corresponds to
- DecodingError
- TooManyRedirects
- TransportError
- HTTPStatusError
- RequestError
- InvalidURL
- CookieConflict
- StreamError
- StreamConsumed
- StreamClosed
- ResponseNotRead
- RequestNotRead
Describe alternatives you've considered
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels