Skip to content

Commit 49d3b34

Browse files
committed
Update elastic-routes.ts
1 parent 350d210 commit 49d3b34

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

helpers/elastic-routes.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,11 @@ export class ElasticRoutes {
344344
onError(err, channel: Channel, callback) {
345345
try {
346346
channel.nackAll();
347-
hLog('NackAll', err);
347+
if (err.meta.body) {
348+
hLog('NackAll:', JSON.stringify(err.meta.body.error, null, 2));
349+
} else {
350+
hLog('NackAll:', err);
351+
}
348352
} finally {
349353
callback();
350354
}
@@ -408,7 +412,6 @@ export class ElasticRoutes {
408412
let maxBlockNum;
409413
this.bulkAction({
410414
index: _index,
411-
type: '_doc',
412415
body: bulkGenerator(payloads, messageMap, (maxBlock) => {
413416
maxBlockNum = maxBlock;
414417
}, routerFunction, _index)

0 commit comments

Comments
 (0)