What does a 406 (Not Acceptable) error code from elasticsearch mean?

Viewed 16085

I am trying to use qwest to send some data to Elasticsearch:

qwest.post(
    'http://elk.example.com:9200/incidents',
    this.incident,
    {cache: true}
)
    .then(function (xhr, response) {
        console.log('incident posted')
    })
    .catch(function (e, xhr, response) {
        console.log('error posing incident: ' + e)
    })

where this.incident is an Object (from Vue.js).

The call fails with a 406 (Not Acceptable) error, which I understand being an information from the Elasticsearch server telling me that I wanted an answer in some format, which he cannot use.

The call fails (there is no document indexed) nevertheless, so I am not sure if my understanding is correct?

If so - what is a correct format to ask for?

1 Answers
Related