@@ -112,7 +112,8 @@ async function dataHandler(messageSet, topic, partition) {
112112 if ( reconcile_flag != 0 ) {
113113 msgValue . msginfo = `Reconcile failed. \n` +
114114 `DB Operation: ${ payload . OPERATION } \n ` +
115- `Error code : ${ msgValue . code } `
115+ `Error code : ${ msgValue . code } \n` +
116+ `Error Detail : ${ msgValue . detail } `
116117 logger . debug ( 'Reconcile failed, sending it to error queue: ' , config . topic_error . NAME ) ;
117118 kafka_error = await pushToKafka ( producer , config . topic_error . NAME , msgValue )
118119 if ( ! kafka_error ) {
@@ -122,7 +123,8 @@ async function dataHandler(messageSet, topic, partition) {
122123 `SequnceId : ${ payload . SEQ_ID } \n` +
123124 `Status : Reconcile failed. Also unable to post the info in kafka error topic channel due to errors \n` +
124125 `DB Operation: ${ payload . OPERATION } \n ` +
125- `Error code : ${ msgValue . code } `
126+ `Error code : ${ msgValue . code } \n` +
127+ `Error Detail : ${ msgValue . detail } `
126128 notify_msg = "consumer_reconcile post fails - unable to post the error in kafka failure topic due to some errors"
127129 await slack . send_msg_to_slack ( notify_msg ) ;
128130 }
@@ -141,7 +143,8 @@ async function dataHandler(messageSet, topic, partition) {
141143 logger . debug ( 'Reached at max retry counter, sending it to error queue: ' , config . topic_error . NAME ) ;
142144 msgValue . msginfo = `Max Retry Reached. \n` +
143145 `DB Operation: ${ payload . OPERATION } \n ` +
144- `Error code : ${ msgValue . code } `
146+ `Error code : ${ msgValue . code } \n` +
147+ `Error Detail : ${ msgValue . detail } `
145148 kafka_error = await pushToKafka ( producer , config . topic_error . NAME , msgValue )
146149 if ( ! kafka_error ) {
147150 logger . info ( "Kafka Message posted successfully to the topic : " + config . topic_error . NAME )
@@ -150,7 +153,8 @@ async function dataHandler(messageSet, topic, partition) {
150153 `SequnceId : ${ payload . SEQ_ID } \n` +
151154 `Status : Max Retry Reached. Also unable to post the info in kafka error topic channel due to errors \n` +
152155 `DB Operation: ${ payload . OPERATION } \n ` +
153- `Error code : ${ msgValue . code } `
156+ `Error code : ${ msgValue . code } \n` +
157+ `Error Detail : ${ msgValue . detail } `
154158 await slack . send_msg_to_slack ( notify_msg ) ;
155159 }
156160 } else {
0 commit comments