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.

Add information in MeiliSearchApiError when http error is raised

See original GitHub issue

When for example a route to the API is wrong, instead of giving details about the wrong API it only returns:

MeiliSearchApiError: Not Found

It should provide the following information:

  • URL
  • HTTP status

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bidoubiwacommented, Apr 7, 2022

The error now returns the following:

MeiliSearchCommunicationError: Not Found: http://127.0.0.1:7700/wrong/plouf

Which seems to must suited!

0reactions
bidoubiwacommented, Oct 6, 2021

I’m changing the assignation of this issue to me as this issue requires more reflexion on how to implement it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Error Handler · Issue #19 · meilisearch/integration-guides
So the raised error could be MeiliSearch::ApiError instead of MeiliSearchApiError . It depends on the language.
Read more >
HTTP response code for POST when resource already exists
This is going to be a pretty long answer, the short summary of which is that HTTP 409 is the most appropriate status...
Read more >
HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >
Error Handling — Falcon 3.1.1 documentation
Represents a generic HTTP error. Raise an instance or subclass of HTTPError to have Falcon return a formatted error response and an appropriate...
Read more >
Best Practices for REST API Error Handling - Baeldung
The first step in handling errors is to provide a client with a proper status code. Additionally, we may need to provide more...
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