Search Posts

HTTP POST error possibly unhandled rejection

I am using Kibana and Elasticsearch with Docker. I create a Kibana plugin which gives the user the possibility to update any index in the ES.
The plugin developed works in my local machine, but in the container I got this error in my console:

404 (Not Found) Possibly unhandled rejection:
text/plain, /“,”kbn-version”:”6.2.4″}},”statusText”:”Not Found”}

My controller:

.controller('editHit', function($http) {
  this.hit = JSON.parse(sessionStorage.getItem('SELECTED_HIT'));
  // Edit the hit
  this.edit = function () {
    // Hit is an object: _id, _index, _score, _source(dataModel), _type
    let doc = JSON.stringify(this.hit._source);
    $`../api/my_discover/index/${this.hit._index}/${this.hit._type}/${this.hit._id}/${doc}`).then((response) => {
     if(response.status === 200){
       alert("Modification done !");


// This API used to do update a hit
    path: '/api/my_discover/index/{name}/{type}/{id}/{doc}',
    method: 'POST',
    handler(req, reply) {
      let doc = JSON.parse(req.params.doc)
        type: req.params.type,
        body: {
          doc: doc
        refresh: true
      }, function (err,response) {

What’s makes me crazy, like I said, the POST works perfectly in my local machine but in the container no! The GET methods (to get list of index for example) work perfectly in both. I can’t find any explanation.
I’ll appreciate any helps guys ^^

Source: AngularJS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.