Skip to content

Commit

Permalink
Email case team only when there's no external reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Paris committed Dec 18, 2024
1 parent 2d2873c commit dcbda28
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions api/src/middlewares/services/SubmitService/SubmitService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ export class SubmitService {
type,
metadata,
});
const caseProcessJob = await caseService.sendToProcessQueue(processQueueData);
this.logger.info({ reference, caseProcessJob }, `SES_PROCESS job queued successfully for ${reference}`);

// only email case team when there is no external reference (i.e. from Orbit) indicating a submission failure there
if (!metadata?.externalReference) {
const caseProcessJob = await caseService.sendToProcessQueue(processQueueData);
this.logger.info({reference, caseProcessJob}, `SES_PROCESS job queued successfully for ${reference}`);
}

const userProcessJob = await this.userService.sendToProcessQueue(answers, { reference, payment: metadata.pay, type, postal: metadata.postal });

Expand Down

0 comments on commit dcbda28

Please sign in to comment.