diff --git a/apps/api/src/tasks/bank-import/import-transactions.task.ts b/apps/api/src/tasks/bank-import/import-transactions.task.ts index 834ae62a..f49a6bf0 100644 --- a/apps/api/src/tasks/bank-import/import-transactions.task.ts +++ b/apps/api/src/tasks/bank-import/import-transactions.task.ts @@ -182,9 +182,11 @@ export class IrisTasks { try { const account = await this.getIrisUserIBANaccount() - if (!account) return Logger.error(`no consent granted for IBAN: ${this.IBAN}`) - if (account.consents.consents[0].status !== 'valid') - return Logger.error(`consent expired for IBAN: ${this.IBAN}`) + // if (!account) return Logger.error(`no consent granted for IBAN: ${this.IBAN}`) + if (!account || account.consents.consents[0].status !== 'valid') { + await this.notifyForExpiringIrisConsentTASK() + return Logger.error(`consent expired or not found for IBAN: ${this.IBAN}`) + } ibanAccount = account } catch (e) {