BadStatusLine bubbles up

Bug #677557 reported by Jonathan Lange
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restfulclient
Triaged
Low
Unassigned

Bug Description

I got this error recently from a run of a script talking to Launchpad:

Traceback (most recent call last):
 File "/home/jml/src/bugjam/bin/update-web", line 8, in <module>
   sys.exit(main(sys.argv))
 File "/home/jml/src/bugjam/bugjam/web.py", line 37, in main
   bug_change = get_stats(pillar_name, start_date)
 File "/home/jml/src/bugjam/bugjam/stats.py", line 184, in get_stats
   pillar = Pillar(launchpad.projects[pillar_name])
 File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py",
line 912, in __getitem__
   unicode(self._root._browser.get(url)))
 File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py",
line 316, in get
   response, content = self._request(url, extra_headers=headers)
 File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py",
line 260, in _request
   str(url), method=method, body=data, headers=headers)
 File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 1099, in request
   (response, new_content) = self._request(conn, authority, uri,
request_uri, method, body, headers, redirections, cachekey)
 File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py",
line 154, in _request
   redirections, cachekey)
 File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 901, in _request
   (response, content) = self._conn_request(conn, request_uri, method,
body, headers)
 File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py",
line 159, in _conn_request
   conn, request_uri, method, body, headers)
 File "/usr/lib/pymodules/python2.6/httplib2/__init__.py", line 871,
in _conn_request
   response = conn.getresponse()
 File "/usr/lib/python2.6/httplib.py", line 986, in getresponse
   response.begin()
 File "/usr/lib/python2.6/httplib.py", line 391, in begin
   version, status, reason = self._read_status()
 File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
   raise BadStatusLine(line)
httplib.BadStatusLine

As far as I can tell, lazr.restfulclient should catch this and retry, rather than requiring API users to handle the error themselves.

Gary Poster (gary)
Changed in lazr.restfulclient:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Robert Collins (lifeless) wrote :

This generally points at bad networking rather than something sensibly retriable. Retrying -might- make sense for idempotent requests, but definitely not for mutating requests.

Changed in lazr.restfulclient:
importance: Medium → Low
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.