Collections can have mismatched total entries

Bug #1655206 reported by Joel Sing
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
New
Undecided
Unassigned

Bug Description

In at least one case, the Launchpad API is returning the following JSON:

{"total_size": 1, "start": 0, "entries": [], "resource_type_link" : https://api.launchpad.net/1.0/#branch_merge_proposal-page-resource"}

Obviously the total_size value of 1 does not match the number of entries available, which is zero.

I believe that this case is due to the OAuth credentials having read access to the gitref, but not to the merge proposal that the collection contains. So in one sense the total_size is correct (there is one merge proposal), but it is invisible to this account.

This makes it difficult for code to rely on the total_size value when fetching entries in the collection. If this is considered to be working-as-intended from a code/API perspective, then it is likely a documentation bug as there does not appear to be any description of this behaviour (or how it should be handled) here:

  https://help.launchpad.net/API/Hacking#A_collection:_the_list_of_bugs

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.