question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

client.create fails with 'No handler found for uri'

See original GitHub issue

I’m currently on the latest api version and i’m trying to use create but it fails and returns this error.

Error: Bad Request
status: 400,
displayName: 'BadRequest',
message: 'Bad Request',
path: '/assets/asset/-KnD8KqWH-c2HpzL9lDM/_create',
query: {},
body: '{"name":"Hjjhs","timestamp":1498107174785,"teamId":"ID-GOES-HERE"}',
statusCode: 400,
response: 'No handler found for uri [//assets/asset/-KnD8KqWH-c2HpzL9lDM/_create] and method [POST]',
toString: [Function],
toJSON: [Function]

Would it have anything to do with the double // in the returned path for the handler? I can submit new entries using a basic HTTP request with node but using this client always fails.

client.create({
  index: 'assets',
  type: 'asset',
  id: id,
  body:  _.pick(data, elasticsearchFields),
}, function (error, response) {
  if (error) {
  	console.log(error)
  } else {
  	console.log(response)
  }
});

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
uribrocommented, Aug 5, 2017

I had same issue, it was because when I defined the elastic search URL I put ‘/’ at the end like this http://host/elasticsearch/ removing ‘/’ from the end solved this issue.

3reactions
ataliadvanstepcommented, Oct 6, 2017

remove the slash at the end of http://host/elasticsearch/, solve the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No handler found for uri [/<index>/<type>/] and method [PUT]
The problem here is the way POST and PUT works, when you use POST , _id is optional, ES will generate a unique...
Read more >
Solved: {"error":"no handler found for uri [/metadata/item...
Solved: Hello everyone, When setting up Geoportal 2.6.5 with ElasticSearch 8.1.3 on a Windows 10 VM, I followed the installation steps ...
Read more >
Inconsistent API Response "error: no handler found for uri"
Hey, doing API POST Requests via Python (on MacOS) I did: elastic_client.update(index='.internal.alerts-security.alerts-default-000001' ...
Read more >
Icinga2 | Elasticsearch Writer showing error "No Handler Found"
Hi Everyone, As per my use case, I am trying to writer my performance data from icinga2 into the Elasticsearch.
Read more >
Loading streaming data from Dynamodb into ElasticSearch
I am facing following errors when triggering lambda for test event. {"error":"no handler found for uri [//lambda-index/_doc/CUSTOMER] and method [PUT]"} { ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found