Skip to content

Commit

Permalink
Return an (empty) "items" array in responses from the elastic _bulk A…
Browse files Browse the repository at this point in the history
…PI (to support clients which expect it to exist)
  • Loading branch information
awesense-paul committed Dec 12, 2024
1 parent 9ad456e commit 3c1cb30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/handlers/elastic_bulk.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async function handler (req, res) {
}
await Promise.all(promises)
res.header('x-elastic-product', 'Elasticsearch')
return res.code(200).send('{"took":0, "errors": false }')
return res.code(200).send('{"took":0, "errors": false, "items": [] }')
}

module.exports = handler

0 comments on commit 3c1cb30

Please sign in to comment.