From 617e57e4c3a02f24c18beae3ecad3929a015f75a Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Thu, 25 Jul 2024 12:10:22 +0530 Subject: [PATCH] Update Listener.ts (#1147) --- utilities/project-factory/src/server/kafka/Listener.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utilities/project-factory/src/server/kafka/Listener.ts b/utilities/project-factory/src/server/kafka/Listener.ts index 4c0742e09d0..734ce1dcce8 100644 --- a/utilities/project-factory/src/server/kafka/Listener.ts +++ b/utilities/project-factory/src/server/kafka/Listener.ts @@ -81,6 +81,7 @@ async function produceModifiedMessages(modifiedMessages: any[], topic: any) { // Send payloads to the Kafka producer producer.send(payloads, (err: any) => { if (err) { + console.error(err); logger.info('KAFKA :: PRODUCER :: Some Error Occurred '); logger.error(`KAFKA :: PRODUCER :: Error : ${JSON.stringify(err)}`); } else { @@ -88,6 +89,7 @@ async function produceModifiedMessages(modifiedMessages: any[], topic: any) { } }); } catch (error) { + console.error(error); logger.error(`KAFKA :: PRODUCER :: Exception caught: ${JSON.stringify(error)}`); throwError("COMMON", 400, "KAKFA_ERROR", "Some error occured in kafka"); // Re-throw the error after logging it }