Skip to content

Commit 3c1cb30

Browse files
committed
Return an (empty) "items" array in responses from the elastic _bulk API (to support clients which expect it to exist)
1 parent 9ad456e commit 3c1cb30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/handlers/elastic_bulk.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async function handler (req, res) {
9999
}
100100
await Promise.all(promises)
101101
res.header('x-elastic-product', 'Elasticsearch')
102-
return res.code(200).send('{"took":0, "errors": false }')
102+
return res.code(200).send('{"took":0, "errors": false, "items": [] }')
103103
}
104104

105105
module.exports = handler

0 commit comments

Comments
 (0)