discogs / discogs_client

DEPRECATED - Official Python Client for the Discogs API
http://www.discogs.com/developers
Other
480 stars 132 forks source link

Handle socket, httplib, and json exceptions #44

Closed sampsyo closed 4 years ago

sampsyo commented 9 years ago

Currently, socket.error exceptions raised during API requests are unhandled and passed through to the client. For consistency, the library should probably catch socket.errors and re-raise discogs_client.exceptions.HTTPErrors.

See https://github.com/sampsyo/beets/issues/1299 for a traceback arising from an unexpected socket closure.

sampsyo commented 9 years ago

Exceptions from httplib also need to be handled (see https://github.com/sampsyo/beets/issues/1305). Note that both of these are raised from within oath2, which really should be handling these but is unmaintained (see #40).

sampsyo commented 9 years ago

Sorry for all the updates, but there's a third category of exception that needs to be caught: JSON decoding errors. This time, we can't blame oauth2 since it is raised directly from client.py. :smiley:

Traceback: https://github.com/sampsyo/beets/issues/1305#issuecomment-72802083

vreon commented 4 years ago

Hi, thank you for opening this issue.

Unfortunately, this project is no longer actively maintained, and today, we're archiving the repository and publishing the final version to PyPI.

We sincerely appreciate your contribution and regret that we weren't able to give it the attention it deserved.