* Updated abort behavior
- Support for aborting a request with the promise api
- Aborting a request will cause a RequestAbortedError
- Normalized Connection class errors, now every error returned is
wrapped by the client errors constructors
* Updated test
* Updated docs
* Updated code generation script
* Renamed test
* Code coverage
* Avoid calling twice transport.request
* Updated Connections handling
- The ConnectionPool.getConnection method now always returns a connection
- The ConnectionPool.update mehtod now cleans the dead list
- Deprecated the NoLivingConnectionsError
* Updated test
* Updated docs
* The NoLivingConnectionsError can still happen if the filter/selector returns no nodes
* Updated test
* Updated docs
* Catch undefined connections as well
* Updated test
* Updated ApiError type def
In very few cases, some API uses the same key for both url and query params, such as the bulk method.
The client is not designed to handle such cases since accepts both url and query keys in the same object, and the url parameter will always take precedence.
This pr fixes this edge case by adding a `querystring` key in the options object.
Fixes: https://github.com/elastic/elasticsearch-js/pull/778
```js
client.bulk({
index: 'index',
type: '_doc',
body: [...]
}, {
querystring: {
type: '_doc'
}
}, console.log)
```