Catch httplib2 error if REST API is not available

Bug #1021364 reported by Florian Fuchs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman REST Client
Fix Released
Undecided
Unassigned
Postorius
Fix Released
Medium
Unassigned

Bug Description

httplib2 (used in mailman.client) throws "[Errno 111] Connection refused" if the core api isn't available.

This should be turned into a nice error page with a meaningful description (possibly depending on the visiting user's role - details for admins and a more vague error msg for everyone else).

Tags: api
description: updated
Changed in postorius:
milestone: none → 1.0.0a2
Revision history for this message
Florian Fuchs (flo-fuchs) wrote :

Fix commited. Please update both postorius as well as mailman.client.

Changed in mailman.client:
status: New → Fix Committed
Changed in postorius:
status: Confirmed → Fix Committed
Revision history for this message
Florian Fuchs (flo-fuchs) wrote :

The first solution was to catch IOError. But because urllib2.HTTPError inherits from IOError, that's too general. Re-opening the ticket...

Changed in mailman.client:
status: Fix Committed → In Progress
Revision history for this message
Florian Fuchs (flo-fuchs) wrote :

urllib2.HTTPError is now catched before IOError, so HTTP exceptions are raised again.

Changed in mailman.client:
status: In Progress → Fix Committed
Changed in mailman.client:
milestone: none → 1.0.0a1
Changed in mailman.client:
status: Fix Committed → Fix Released
Changed in postorius:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.