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

Bad http status and error message on wrong payload #4698

Closed
irevoire opened this issue Jun 13, 2024 · 1 comment · Fixed by #4716
Closed

Bad http status and error message on wrong payload #4698

irevoire opened this issue Jun 13, 2024 · 1 comment · Fixed by #4716
Labels
bug Something isn't working as expected good first issue Good for newcomers
Milestone

Comments

@irevoire
Copy link
Member

Describe the bug
When sending badly formatted payload to meilisearch it returns a « 500 internal error » instead of a user error.
The error message is also quite ugly.

To Reproduce
Steps to reproduce the behavior:
1.echo "kefir" | http PUT :7700/indexes/12/documents "Content-Type: application/json" "Content-Encoding: gzip"
2.

HTTP/1.1 500 Internal Server Error
content-encoding: gzip
content-type: application/json
date: Thu, 13 Jun 2024 14:31:37 GMT
transfer-encoding: chunked
vary: Origin, Access-Control-Request-Method, Access-Control-Request-Headers
vary: accept-encoding

{
    "code": "internal",
    "link": "https://docs.meilisearch.com/errors#internal",
    "message": "payload reached EOF before completing: Some(Custom { kind: Other, error: DecompressError(General { msg: None }) })",
    "type": "internal"
}
@irevoire irevoire added bug Something isn't working as expected good first issue Good for newcomers labels Jun 13, 2024
@Karribalu
Copy link
Contributor

Hey @irevoire,

I opened PR #4716 for this fix, but I don't see my changes affecting any tests. However, I am seeing some random test failures. Can you please guide me on whether my changes are related to any other tests?

Thank you!

@meili-bors meili-bors bot closed this as completed in 1e4699b Jun 26, 2024
@curquiza curquiza added this to the v1.10.0 milestone Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants