GitRef attempts to decode invalid results, inscruitable error

Bug #1876836 reported by Stuart Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpad-api-client
New
Undecided
Unassigned

Bug Description

GitRef calls gitRefFromLink, which is getting a successful (err == nil) result from Launchpad. But the body is not JSON, and the decode fails with the useless-for-further-diagnosis error: failed to unmarshal gitref: invalid character '<' looking for beginning of value

We should catch non-JSON responses and give a more useful error message. Suspect we are getting a login or permission denied HTML page.

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.