getSeries() on an non-existing raises BadRequest, would expect NotFound

Bug #797917 reported by Francis J. Lacoste
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Francis J. Lacoste

Bug Description

>>> from launchpadlib.launchpad import Launchpad
>>> lp = Launchpad.login_with('test_case')
>>> lp.distributions['ubuntu'].getSeries(name_or_version='foobar')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/francis/canonical/launchpad/devel/eggs/lazr.restfulclient-0.11.2-py2.6.egg/lazr/restfulclient/resource.py", line 573, in __call__
    url, in_representation, http_method, extra_headers=extra_headers)
  File "/home/francis/canonical/launchpad/devel/eggs/lazr.restfulclient-0.11.2-py2.6.egg/lazr/restfulclient/_browser.py", line 281, in _request
    raise error
lazr.restfulclient.errors.BadRequest: HTTP Error 400: Bad Request
Response headers:
---
connection: close
content-length: 38
content-type: text/plain
date: Wed, 15 Jun 2011 20:58:03 GMT
server: zope.server.http (HTTP)
status: 400
vary: Accept,Accept-Encoding
via: 1.1 wildcard.staging.launchpad.net
x-lazr-notifications: []
x-powered-by: Zope (www.zope.org), Python (www.python.org)
---
Response body:
---
No such distribution series: 'foobar'.
---

I would have expected a NotFound (404) error.

Tags: qa-ok

Related branches

Changed in launchpad:
assignee: nobody → Francis J. Lacoste (flacoste)
status: Triaged → In Progress
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
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.