Comment 11 for bug 413174

Revision history for this message
Gary Poster (gary) wrote :

We agree on the tension.

However, I disagree that an assertion error is the kind of error that is appropriate to send to end users. I think assertion errors are for cases that should never happen according to the expected logic of your code block, and as such are always something for Launchpad coders to address. In contrast, many (but, I'm pretty sure, not all) errors are appropriate to share with programmers-over-the-wire, because they indicate things they need to change in their usage of the API.

In regards to the use of asserts, I'm hoping we can agree to disagree for this particular case.

We intend to close this bug once it is possible to explicitly mark a raised error as safe for exporting (its type and value). Then we will convert the two pertinent errors from the OOPS reports to more description exception types (e.g., ValueError) and mark them safe for export. Then we will close the bug.

In my mind, the primary point of disagreement as to what to do now is whether we should have a whitelist or a blacklist of exposing error messages to API users. Whitelists are easier to do safely up-front, obviously, and can be changed to blacklists later if they are determined to be impractical.

Benji is proceeding with the change that he's described now, in our hopes that it will be a good step forward.