File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { randomUUID } from 'node:crypto'
22import { pipeline } from 'node:stream/promises'
33import { setTimeout } from 'node:timers/promises'
44import {
5- InternalError ,
5+ InternalError , isError ,
66 resolveGlobalErrorLogObject ,
77 stringValueSerializer ,
88 type TransactionObservabilityManager ,
@@ -239,8 +239,12 @@ export abstract class AbstractKafkaConsumer<
239239
240240 try {
241241 await this . consumer . close ( )
242- } catch {
243- // Ignoring errors at this stage
242+ } catch ( err ) {
243+ // Reporting error but not throwing further
244+ this . logger . warn ( resolveGlobalErrorLogObject ( err ) , 'Error while closing Kafka consumer' )
245+ this . errorReporter . report ( {
246+ error : isError ( err ) ? err : new Error ( 'Unknown error while closing Kafka consumer' )
247+ } )
244248 }
245249 this . consumer = undefined
246250 }
You can’t perform that action at this time.
0 commit comments