Comment 10 for bug 413174

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 413174] Re: API AssertionError could be adapted to a http code

I think there is an undisclosed tension here.

In the past, once things got past the HTTP parser, all API misuses
were *LP developer bugs*.

Now though, folk can use the model code directly via the LP API, and
so things that previously were a programmer error on the LP team are
now a programmer error on a consumer of the API.

It makes sense to me that these are *still AssertionErrors*, its still
a programming error.

(That said, I try not to use assert much if at all, ValueError is a
better way of signalling an incorrect input to a function) - I'm
simply noting that all that has happened here is the population of
'programmers' has increased, whether something is a programmer error
not not hasn't altered.