[Backport 7.x] Show the body as string if the response error can't be read as ES error (#1514)
* Show the body as string if the response error can't be read as ES error * Updated test Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a48ebc9442
commit
559acd32be
@ -649,7 +649,7 @@ test('500 error', t => {
|
||||
}
|
||||
}
|
||||
}, (err, result) => {
|
||||
t.equal(err.message, 'Response Error')
|
||||
t.equal(err.message, '{"error":"kaboom"}')
|
||||
|
||||
client.search({
|
||||
index: 'foo',
|
||||
|
||||
Reference in New Issue
Block a user