diff --git a/src/components/Connection/ConnectionOAuth.tsx b/src/components/Connection/ConnectionOAuth.tsx index 1bd69c164cb941b594abd1c27f3b3a15833904af..3fbccefa18923b259c6cbdaa810bdba99adea60c 100644 --- a/src/components/Connection/ConnectionOAuth.tsx +++ b/src/components/Connection/ConnectionOAuth.tsx @@ -43,6 +43,7 @@ const ConnectionOAuth: React.FC<ConnectionOAuthProps> = ({ const accountService = new AccountService(client) const account = await accountService.getAccount(accountId) if (!account) { + console.log('OAUTH CONNECTION - ACCOUNT NOT FOUND') const updatedConnection: FluidConnection = { ...fluidStatus.connection, account: null, @@ -57,6 +58,7 @@ const ConnectionOAuth: React.FC<ConnectionOAuthProps> = ({ result: 'error', }) } else { + console.log('OAUTH CONNECTION - ACCOUNT FOUND : ', account) const triggersServices = new TriggerService(client) const trigger: Trigger = await triggersServices.createTrigger( account, diff --git a/src/components/Konnector/KonnectorViewerCard.tsx b/src/components/Konnector/KonnectorViewerCard.tsx index f837bd05c5bcf0022dedbf3ababc13ac3781f238..5da295ee5937bd621ace37fae3b89c7ba324b3f2 100644 --- a/src/components/Konnector/KonnectorViewerCard.tsx +++ b/src/components/Konnector/KonnectorViewerCard.tsx @@ -56,6 +56,7 @@ import UsageEventService from 'services/usageEvent.service' import { UsageEventType } from 'enum/usageEvent.enum' import PartnersInfoService from 'services/partnersInfo.service' import { PartnersInfo } from 'models/partnersInfo.model' +import log from 'utils/logger' interface KonnectorViewerCardProps { fluidStatus: FluidStatus @@ -311,6 +312,10 @@ const KonnectorViewerCard: React.FC<KonnectorViewerCardProps> = ({ fluidStatus.connection.shouldLaunchKonnector && !isKonnectorRunning(trigger) ) { + console.log('c quoi lembrouille allo quoi') + log.info( + '[KonnectorViewerCard] about to launch connectionFlow from harvest lib' + ) const connectionFlow = new ConnectionFlow(client, trigger, konnector) await connectionFlow.launch() connectionFlow.jobWatcher.on(ERROR_EVENT, () => { diff --git a/src/services/account.service.ts b/src/services/account.service.ts index c462d91d07b77aa9ccd262757d82ed10017068ca..d750834626606b228a9dbd6dda292226c56c488b 100644 --- a/src/services/account.service.ts +++ b/src/services/account.service.ts @@ -31,12 +31,7 @@ export default class AccountService { konnector, accountAuthData ) - const account = await createAccount( - this._client, - konnector, - accountAttributes - ) - return account + return createAccount(this._client, konnector, accountAttributes) } public async getAccount(id: string): Promise<Account> {