You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have occasionally encountered the following error in our application:
FunctionClauseError: no function clause matching in Meilisearch.Error.cast/1
File "lib/meilisearch/error.ex", line 135, in Meilisearch.Error.cast/1
File "lib/meilisearch/client.ex", line 58, in Meilisearch.Client.handle_response/1
File "lib/meilisearch/search.ex", line 148, in Meilisearch.Search.search/3
<snip>
It appears that for some reason, the body of the request to Meili is neither nil nor a map. I believe it is likely an error message - a binary - but there is no function clause for cast/1 in error.ex to handle this and return it to our application.
I believe this could be fixed by adding a clause to handle a binary body, by returning a Meilisearch.Error where the body is in the message key of the Error struct. I can open a PR to make this change if you like the idea.
The text was updated successfully, but these errors were encountered:
We have occasionally encountered the following error in our application:
It appears that for some reason, the body of the request to Meili is neither
nil
nor a map. I believe it is likely an error message - a binary - but there is no function clause forcast/1
inerror.ex
to handle this and return it to our application.I believe this could be fixed by adding a clause to handle a binary body, by returning a Meilisearch.Error where the body is in the
message
key of the Error struct. I can open a PR to make this change if you like the idea.The text was updated successfully, but these errors were encountered: