News for hackers. Stuff that matters.
Re:Multiversion Python Thoughts by snatchpiesinger on Tuesday October 01, 2024 @10:17AM (#41708787)
It's fine as long as you catch all exceptions, and only produce ones that you document. Your users aren't supposed to know that you used `requests` at all.
Re:Multiversion Python Thoughts by orf on Tuesday October 01, 2024 @10:27AM (#41708906)
Sure, but who does this? And the typical pattern is to wrap exceptions, giving you access to the inner exception if you need more context.

The requests HTTP exception contains the request and response object. Wrapping that would be a huge pain and a lot of code.