[Bug 1021364] [NEW] Catch httplib2 error if REST API is not available

Public bug reported: 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). ** Affects: mailman.client Importance: Undecided Status: New ** Affects: postorius Importance: Medium Status: Confirmed ** Tags: api ** Description changed: - httplib2 throws "[Errno 111] Connection refused" if the core api isn't - available. + 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). ** Also affects: mailman.client Importance: Undecided Status: New ** Changed in: postorius Milestone: None => 1.0.0a2 -- You received this bug notification because you are a member of Mailman Coders, which is the registrant for Postorius. https://bugs.launchpad.net/bugs/1021364 Title: Catch httplib2 error if REST API is not available To manage notifications about this bug go to: https://bugs.launchpad.net/mailman.client/+bug/1021364/+subscriptions

** Branch linked: lp:~flo-fuchs/postorius/bug-1021364 -- You received this bug notification because you are a member of Mailman Coders, which is the registrant for Postorius. https://bugs.launchpad.net/bugs/1021364 Title: Catch httplib2 error if REST API is not available To manage notifications about this bug go to: https://bugs.launchpad.net/mailman.client/+bug/1021364/+subscriptions

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 -- You received this bug notification because you are a member of Mailman Coders, which is the registrant for Postorius. https://bugs.launchpad.net/bugs/1021364 Title: Catch httplib2 error if REST API is not available To manage notifications about this bug go to: https://bugs.launchpad.net/mailman.client/+bug/1021364/+subscriptions

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 -- You received this bug notification because you are a member of Mailman Coders, which is the registrant for Postorius. https://bugs.launchpad.net/bugs/1021364 Title: Catch httplib2 error if REST API is not available To manage notifications about this bug go to: https://bugs.launchpad.net/mailman.client/+bug/1021364/+subscriptions

** Branch linked: lp:mailman.client -- You received this bug notification because you are a member of Mailman Coders, which is the registrant for Postorius. https://bugs.launchpad.net/bugs/1021364 Title: Catch httplib2 error if REST API is not available To manage notifications about this bug go to: https://bugs.launchpad.net/mailman.client/+bug/1021364/+subscriptions

urllib2.HTTPError is now catched before IOError, so HTTP exceptions are raised again. ** Changed in: mailman.client Status: In Progress => Fix Committed -- You received this bug notification because you are a member of Mailman Coders, which is the registrant for Postorius. https://bugs.launchpad.net/bugs/1021364 Title: Catch httplib2 error if REST API is not available To manage notifications about this bug go to: https://bugs.launchpad.net/mailman.client/+bug/1021364/+subscriptions

** Changed in: mailman.client Status: Fix Committed => Fix Released ** Changed in: postorius Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman REST Client. https://bugs.launchpad.net/bugs/1021364 Title: Catch httplib2 error if REST API is not available To manage notifications about this bug go to: https://bugs.launchpad.net/mailman.client/+bug/1021364/+subscriptions
participants (2)
-
Florian Fuchs
-
Launchpad Bug Tracker