Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Error Handling for invalid ID field #1605

Closed
MurkyTheMurloc opened this issue Nov 19, 2023 · 1 comment
Closed

Better Error Handling for invalid ID field #1605

MurkyTheMurloc opened this issue Nov 19, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@MurkyTheMurloc
Copy link

Description
When using an invalid ID field inside a data object, server response with 200 instead of yelling at me that he can't update the data.

Basic example
So yesterday I had 5 hours of fun debugging my server because the data inside my Meilisearch db didn't update. So I looked at the docker container logs, but they were totally fine. Then I logged the response of await this.MEILISEARCH_DB.index(key).updateDocuments(data); but also there was no error, the response was 200 and all seemed fine. So a couple of hours later I could nail down on the ID field. My data contained a Id field with a graphql endpoint as value gid://Endpoint/Product/<id>. So this is totally my mistake but better Error handling could saved me some debugging time.

Other
In generell I want to thank you for your awesome work so far I really enjoy working with Meilisearch :)

@brunoocasali
Copy link
Member

Hi @MurkyTheMurloc, sorry to hear about that debugging time :/

We try to extensively document the nature of being async in the docs and around the primary key of your documents...
Usually, the task response should work 200 OK, but what really matters is after that where you can see what happened with your request.

In any case, if you think it is useful, you could push a discussion further here https://github.com/orgs/meilisearch/discussions where you can give some examples of how that could be better implemented.

Thanks a lot for using Meilisearch and for taking the time on giving this feedback!

@brunoocasali brunoocasali added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants