erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

refactor: plaid connection

Open batonac opened this issue 6 months ago • 6 comments

This makes the plaid bank connector much more performant and less error-prone.

  • plaid_access_token is updated in the database directly via frappe.db.set_value instead of attempting to loading and save the Bank doc.
  • The try/except clause in add_institution is expanded to include all updates to the plaid_access_token, to catch any errors related to the given bank_name
  • add_institution is refactored to return just the bank_name instead of the bank doc, since only the bank_name is used in the subsequent add_bank_accounts function.
  • Throw a dedicated error if bank_name is not returned in the Plaid response.

batonac avatar Aug 28 '24 01:08 batonac