fastly-py icon indicating copy to clipboard operation
fastly-py copied to clipboard

ApiValueError on list invitations

Open morrieinmaas opened this issue 1 year ago • 1 comments

Version: 6.0.0

When trying to retrieve a list of open invites from fastly using the client i get

/fastly/model_utils.py", line 1789, in get_allof_instances
    raise ApiValueError(
fastly.exceptions.ApiValueError: Invalid inputs given to generate an instance of 'InvitationsResponseAllOf'. The input data was invalid for the allOf schema 'InvitationsResponseAllOf' in the composed schema 'InvitationsResponse'. Error=Invalid inputs given to generate an instance of 'InvitationData'. The input data was invalid for the allOf schema 'InvitationData' in the composed schema 'InvitationResponseData'. Error=Invalid type for variable 'data'. Required value type is list and passed type was NoneType at ['received_data']['data'][0]['relationships']['service_invitations']['data']

I suspect but am not entirely sure that the error is not in the tyope validation per se, but from the call_api method's return.

I tried calling the endpoint from call_api() and that returns None. I guess returning an empty list here would solve above error.

However, after checking manually in fastly I see there are a bunch of open invites in my case. So i tried with curl instead, which gives me the list of open invites I see on the fastly website as well.

morrieinmaas avatar Dec 10 '24 08:12 morrieinmaas

Updating this ticket to mark that an internal ticket exists to track this issue.

harmony7 avatar Jan 20 '25 04:01 harmony7