linkedin-developers / linkedin-api-python-client

Official Python client library for LinkedIn APIs
Other
175 stars 35 forks source link

default value should be empty list to iterate on it #62

Open dia-tradelab opened 5 months ago

dia-tradelab commented 5 months ago

https://github.com/linkedin-developers/linkedin-api-python-client/blob/6331e52f5ea59b326447efa67a9bf925ed2d9ec7/linkedin_api/clients/restli/response_formatter.py#L142

@shimizust When no "elements" returned in json_data => it raises a "ResponseFormattingError" because of "None" default value and doesn't show the body of the real exception

replace elements = json_data.get("elements", None) by elements = json_data.get("elements", [])