On Thu, Jun 16, 2011 at 10:05 AM, Francis J. Lacoste <francis.laco...@canonical.com> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > We have a bunch of exceptions that are mapped to 400 but should really > be mapped to 404. NoSuchPPA, NoSuchDistroSeries, NoSuchBranch, etc. > > Fixing that is trivial, but we don't have a way of saying: if this > exception occurs when the webservice is using that service, use that > code, otherwise use that other code. We could probably add that > functionality, but is it worth it? > > Changing this would break error handling logic that relied on catching > BadRequest to handle not found cases. Given that BadRequest is not > overly specific, it would make sense to confirm the error through the > string in that case, but I don't know if clients did this.
Code catching BadRequest and treating that as 'no such object' is broken - it will handle things wrong /anyway/ - so I would be happy with you just changing to issue 404's. -Rob _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp