mediacloud / wayback-news-client

A client library to access the Wayback Machine news archive search.
Apache License 2.0
4 stars 2 forks source link

No exception handling for http requests #2

Closed vbanos closed 2 years ago

vbanos commented 2 years ago

Its quite possible to have HTTP exceptions. You need to catch them and log the relevant error. using SearchApiClient._logger.

rahulbot commented 2 years ago

Thanks for the suggestions. I was considering this a pretty thin client, so exceptions would just be raised up to the package user to be dealt with in their integration. Your thoughts on that approach?

vbanos commented 2 years ago

Well, I guess this is a matter of taste. I understand your approach. I have the opposite approach in general, catch the exception at the earliest possible point.