This is basically the equivalent of returning a 500 or failing a task. You know that your code failed somewhere but there is no way you can recover from it (granted your code is not idempotent so retrying everything is not an option).
By catching all exceptions as close as possible of the request you make, you can at least do something about it.
As for the tree of exceptions, it works well for a while until networks become unreliable, until remote peers start presenting certificates broken in subtle ways... You end up adding ranges of exception in the except clause as new ones are popping on Sentry. Then you get tired of it so you catch "Exception".
This is the unfortunate story of every single project I do that deals with network calls on the Internet.
By catching all exceptions as close as possible of the request you make, you can at least do something about it.
As for the tree of exceptions, it works well for a while until networks become unreliable, until remote peers start presenting certificates broken in subtle ways... You end up adding ranges of exception in the except clause as new ones are popping on Sentry. Then you get tired of it so you catch "Exception".
This is the unfortunate story of every single project I do that deals with network calls on the Internet.