From 1a2ee62929ed7589efaea3aad4e165ad233179e5 Mon Sep 17 00:00:00 2001 From: praju-aot Date: Mon, 25 Nov 2024 23:59:17 -0500 Subject: [PATCH 1/2] fix: ORV2-3093 - Workaround for CDOGS bug that throws 404 when processing simultaneous requests --- dops/src/modules/common/common.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dops/src/modules/common/common.service.ts b/dops/src/modules/common/common.service.ts index a2fda20ee..f77cfe962 100644 --- a/dops/src/modules/common/common.service.ts +++ b/dops/src/modules/common/common.service.ts @@ -22,7 +22,11 @@ export class CommonService { error.code === 'ECONNABORTED' || error.code === 'ECONNREFUSED' || error.code === 'ECONNRESET' || - error.response?.status >= 500 + error.response?.status >= 500 || + //CDOGS has a bug that throws 404 when processing multiple requests at + //a time. It's resolved on retry. + (error.response?.status === 404 && + error.config.url === process.env.CDOGS_URL) ); }, onRetry: (retryCount, error, requestConfig) => { From ecc2122db7e007972b050d71ea71dbdfdc138613 Mon Sep 17 00:00:00 2001 From: praju-aot Date: Tue, 26 Nov 2024 00:02:25 -0500 Subject: [PATCH 2/2] fix: Make the permit and receipt pdf generation asynchronous at time of issuance --- .../application/company-application.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vehicles/src/modules/permit-application-payment/application/company-application.controller.ts b/vehicles/src/modules/permit-application-payment/application/company-application.controller.ts index 56610a8f2..5a4f7c6dd 100644 --- a/vehicles/src/modules/permit-application-payment/application/company-application.controller.ts +++ b/vehicles/src/modules/permit-application-payment/application/company-application.controller.ts @@ -316,7 +316,7 @@ export class CompanyApplicationController { ); if (result?.success?.length) { - await Promise.allSettled([ + void Promise.allSettled([ this.permitReceiptDocumentService.generatePermitDocuments( currentUser, result.success,