Skip to content

Commit

Permalink
Merge pull request #232 from direct808/master
Browse files Browse the repository at this point in the history
Fix response.body always undefined
  • Loading branch information
vanthome authored Jun 2, 2023
2 parents 8f35767 + f7c21c2 commit fb870f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions bulk_writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "winston-elasticsearch",
"version": "0.17.2",
"version": "0.17.3",
"description": "An Elasticsearch transport for winston",
"main": "index",
"authors": [
Expand Down

0 comments on commit fb870f9

Please sign in to comment.