We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Regarding this line:
elastic/lib/elastic/document/api.ex
Line 190 in 1e2c7a3
Could we handle the error case for the Document.API.search as well? If for example the index doesn't exist it creates a nasty exception.
The text was updated successfully, but these errors were encountered:
Something like:
case result do {:error, code, error} -> {:error, code, error} {:ok, 200, %{"hits" => %{"hits" => hits}}} -> Enum.map(hits, fn %{"_source" => source, "_id" => id} -> into_struct(id, source) end) end
I can make a PR. Then you can have the option to deal with the errors without breaking existing code.
Sorry, something went wrong.
Yes please do submit a PR for this.
No branches or pull requests
Regarding this line:
elastic/lib/elastic/document/api.ex
Line 190 in 1e2c7a3
Could we handle the error case for the Document.API.search as well? If for example the index doesn't exist it creates a nasty exception.
The text was updated successfully, but these errors were encountered: