API generation
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
function buildFieldCaps (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError } = opts
|
||||
const { makeRequest, ConfigurationError, result } = opts
|
||||
/**
|
||||
* Perform a [field_caps](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html) request
|
||||
*
|
||||
@ -75,7 +75,7 @@ function buildFieldCaps (opts) {
|
||||
if (params.headers != null && typeof params.headers !== 'object') {
|
||||
return callback(
|
||||
new ConfigurationError(`Headers should be an object, instead got: ${typeof params.headers}`),
|
||||
{ body: null, headers: null, statusCode: null }
|
||||
result
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user