Skip to content

Commit 0a0a556

Browse files
feat: Implemented Sentry error capturing in end import consumer
1 parent ba943ef commit 0a0a556

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/queue-manager/src/consumers/end-import.consumer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as Sentry from '@sentry/node';
12
import { Readable } from 'stream';
23
import { DalService, FileRepository, UploadRepository } from '@impler/dal';
34
import { QueuesEnum, EndImportData, FileMimeTypesEnum, DestinationsEnum } from '@impler/shared';
@@ -39,7 +40,7 @@ export class EndImportConsumer extends BaseConsumer {
3940
}
4041
}
4142
} catch (error) {
42-
console.log(`Error processing import for uploadId: ${data.uploadId}`, error);
43+
Sentry.captureException(error);
4344
}
4445
}
4546

@@ -76,7 +77,7 @@ export class EndImportConsumer extends BaseConsumer {
7677
);
7778
}
7879
} catch (error) {
79-
console.log(`Error converting records to CSV for uploadId: ${uploadId}`, error);
80+
Sentry.captureException(error);
8081
}
8182
}
8283

0 commit comments

Comments
 (0)