fix: verbose error message when api keys are not setup
This commit is contained in:
@@ -22,6 +22,10 @@ erpnext.integrations.plaidLink = class plaidLink {
|
||||
frappe.xcall('erpnext.erpnext_integrations.doctype.plaid_settings.plaid_settings.plaid_configuration')
|
||||
.then(result => {
|
||||
if (result !== "disabled") {
|
||||
console.log(result)
|
||||
if (result.plaid_env == undefined || result.plaid_public_key == undefined) {
|
||||
frappe.throw(__("Please add valid Plaid api keys in site_config.json first"));
|
||||
}
|
||||
me.plaid_env = result.plaid_env;
|
||||
me.plaid_public_key = result.plaid_public_key;
|
||||
me.client_name = result.client_name;
|
||||
|
||||
Reference in New Issue
Block a user