Thanks to visit codestin.com
Credit goes to github.com

Skip to content

:error atom returning when trying to put. #270

@simonfl3tcher

Description

@simonfl3tcher

I am trying to create an index and then add a document to that index. However, when I run Tirexs.HTTP.put("/my-index-name") it simply returns an atom of :error. I have tried to use put! to discover more, but it returns the following error:

** (FunctionClauseError) no function clause matching in Tirexs.HTTP.ok!/1
    (tirexs) lib/tirexs/http.ex:320: Tirexs.HTTP.ok!(:error)

Running Tirexs.ENV.default_uri_env returns:

%URI{authority: "127.0.0.1:9200", fragment: nil, host: "127.0.0.1", path: nil,
 port: 9200, query: nil, scheme: "http", userinfo: nil}

Specs:

Elixir 1.4.1
Erlang/OTP 19

I think I know the problem (it is not connecting to the ES service), but it would be good to see some form of error message to clarify my suspicions. Is there any way that I can do that? If not, I would be happy to take a look at how we could return some information in this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions