Merge branch 'master' into 7.x

This commit is contained in:
delvedor
2019-03-26 12:06:04 +01:00
270 changed files with 1805 additions and 2800 deletions

View File

@ -24,7 +24,7 @@
function buildIndicesGet (opts) {
// eslint-disable-next-line no-unused-vars
const { makeRequest, ConfigurationError, result } = opts
const { makeRequest, ConfigurationError, handleError } = opts
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html) request
*
@ -90,24 +90,18 @@ function buildIndicesGet (opts) {
// check required parameters
if (params['index'] == null) {
return callback(
new ConfigurationError('Missing required parameter: index'),
result
)
const err = new ConfigurationError('Missing required parameter: index')
return handleError(err, callback)
}
if (params.body != null) {
return callback(
new ConfigurationError('This API does not require a body'),
result
)
const err = new ConfigurationError('This API does not require a body')
return handleError(err, callback)
}
// validate headers object
if (options.headers != null && typeof options.headers !== 'object') {
return callback(
new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`),
result
)
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
return handleError(err, callback)
}
var warnings = null