diff --git a/bulk_writer.js b/bulk_writer.js index 2dff7a0..56a8870 100644 --- a/bulk_writer.js +++ b/bulk_writer.js @@ -129,8 +129,7 @@ BulkWriter.prototype.write = function write(body) { wait_for_active_shards: this.waitForActiveShards, timeout: this.interval + 'ms', }) - .then((response) => { - const res = response.body; + .then((res) => { if (res && res.errors && res.items) { const err = new Error('Elasticsearch error'); res.items.forEach((item, itemIndex) => { diff --git a/package.json b/package.json index 25cc2a3..fd7e267 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "winston-elasticsearch", - "version": "0.17.2", + "version": "0.17.3", "description": "An Elasticsearch transport for winston", "main": "index", "authors": [