passiomatic / coldsweat

Web RSS aggregator and reader compatible with the Fever API
MIT License
146 stars 21 forks source link

Capture Requests' exceptions.DecodeError #30

Closed passiomatic closed 10 years ago

passiomatic commented 11 years ago

The exception below should be catched and feed-error_count increased:

requests.packages.urllib3.exceptions.DecodeError: ('Received response with content-encoding: gzip, 
but failed to decode it.', error('Error -3 while decompressing: incorrect header check',))

For an example see the techdirt RSS feed: http://www.techdirt.com/techdirt_rss.xml (Appears to be fixed now).

passiomatic commented 10 years ago

Requests 2.2 introduces ContentDecodingError exception. Given that Coldsweat already catch the RequestException superclass we effectively already catch ContentDecodingError too. Coldsweat marks that as "Service Unavailable" tough.

http://docs.python-requests.org/en/latest/community/updates/#id1