plaid/plaid-python

Invalid type for variable 'form1099s'

MariaMozgunova opened this issue · 4 comments

First of all, thank you for your hard work and a great library

I guess I encountered a bug

I build a Python app
Currently, I integrate the app with Plaid with the help of your library
I use the Plaid Income product to get income reports. The environment I use is Sandbox.
So when I send a request to /credit/payroll_income/get endpoint, I get the following error:

plaid.exceptions.ApiTypeError: Invalid type for variable 'form1099s'. Required value type is list and passed type was NoneType at ['received_data']['items'][0]['payroll_income'][0]['form1099s']

I guess in the documentation, form1099s is expected to be an empty array when form1099s data is empty. However, Plaid sends just a NoneType instead of an empty array.

Any help would be appreciated!

@MariaMozgunova thank you for the report! This is definitely a bug and we'll need to change this -- I need to check with the team to see if it's safer for us to change the behavior to match the documentation or the documentation to match the behavior :-)

@phoenixy1
Thank you for your reply!
Looking forward to updates.

@phoenixy1
Plaid Support confirmed that the fix needs to be done in the Python client library.
Will you be able to do the fix? Can you give me an approximate ETA?

@MariaMozgunova So as it turned out, the team actually decided to change the API behavior to match the client library (since the client library properly followed the documentation and approved spec/design, the bug was in the API), so no fix will need to be done in the client library. The change has been merged and should be deployed soon, if it hasn't already.