Skip to content

Check configuration correctness on the client library level #481

@MariaMozgunova

Description

@MariaMozgunova

I noticed that if I provide Products("income_verification") to LinkTokenCreateRequest, but do not specify appropriate parameters for the LinkTokenCreateRequest, like below:

user_token=<user_token>,
income_verification=LinkTokenCreateRequestIncomeVerification(
    income_source_types=[IncomeVerificationSourceType("bank")],
    bank_income=LinkTokenCreateRequestIncomeVerificationBankIncome(
        days_requested=<days_requested>
    ),
),

I will get the invalid request error.

But this error is returned from Plaid API. Why not do this check at the level of the plaid-python library as well?

The possible analogy coming to my mind is the validation of the fields on the websites. Validations usually take place both on the front-end and back-end. Front-end needs to validate the data in the input field because it will be faster than sending invalid data to the back-end. In the case of the plaid-client library, it acts as the front-end. If we know that some additional attributes should be set when Products("income_verification") is listed in the products list, why not do the check?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions