Unhelpful error on badly declared API export

Bug #539070 reported by Jonathan Lange on 2010-03-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Benji York

Bug Description

Recently, didrocks & I were trying to expose GPG keys via the API.

As part of an early attempt, we accidentally said that IPerson.gpgkeys was a list of IGPGKeySets rather than IGPGKeys.

That is, we wrote:
    gpg_keys = exported(
            title=_("List of valid OpenPGP keys ordered by ID"),
            readonly=False, required=False,

Rather than:
    gpg_keys = exported(
            title=_("List of valid OpenPGP keys ordered by ID"),
            readonly=False, required=False,

When we tried to test this (a step which demanded building the wadl & apidocs first), we got an obsure error: ` AssertionError: No IEntry adapter found for IGPGKeySet (web service version: devel).`

The error gave no hint of which declaration was causing the problems, not even which file the bad declaration was in, so we spent a lot of time trying to expose IGPGKeySet as a collection.

It would be very useful if the error message included some reference to the declaration that causes the problems. Bonus points for not being an assertion error.

Related branches

Gary Poster (gary) wrote :

FWIW, I added this to my list of things to talk to Jonathan Lange about to possible start soon.

Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Low
Benji York (benji) on 2010-11-03
Changed in launchpad-foundations:
assignee: nobody → Benji York (benji)
status: Triaged → In Progress
Benji York (benji) on 2010-11-05
Changed in launchpad-foundations:
status: In Progress → Fix Committed
Curtis Hovey (sinzui) on 2010-12-23
affects: launchpad → lazr.restful
Benji York (benji) on 2011-01-19
tags: added: qa-untestable
Benji York (benji) on 2011-01-27
Changed in lazr.restful:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers