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

fix: add missing case in spec of multi_search #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

davidjulien
Copy link

Meilisearch.MultiSearch.multi_search calls Meilisearch.Client.handle_response() (here) which can return {:error, Meilisearch.Error.cast(body), status} (here)

Because this case is missing in multi_search spec (here), dialyxir returns this error when multi_search fun is used:

The pattern can never match the type.

Pattern:
{:error, _error, _status}

Type:

  {:error,
   Tesla.Error
   | nil
   | %Meilisearch.Error{
       :code => atom(),
       :link => binary(),
       :message => binary(),
       :type => :auth | :internal | :invalid_request | :system
     }}

`Meilisearch.MultiSearch.multi_search` calls `Meilisearch.Client.handle_response()`
which can return `{:error, Meilisearch.Error.cast(body), status}`

This case is missing in `multi_search` spec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant