bluefeet/GitLab-API-v4

Errors on Gitlab API returning invalid JSON

Closed this issue · 1 comments

Gitlab API doesn't always return valid JSON. For example block_user & unblock_user just return strings 'true' or 'false' this causes Serializer to fall over with a error as below

Data was $VAR1 = [
'true'
];
at /usr/lib/perl5/vendor_perl/5.26.0/Role/REST/Client/Serializer.pm line 80.
Couldn't deserialize data with application/json: JSON text must be an object or array (but found number, string, true, false or null, use allow_nonref to allow this) at /usr/pkg/lib/perl5/vendor_perl/5.26.0/Data/Serializer/JSON.pm line 17.

Thanks for the API
Royce

Fixed by #13. :)