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

Hunter.create_status fails #14

Closed
optikfluffel opened this issue Mar 20, 2019 · 2 comments
Closed

Hunter.create_status fails #14

optikfluffel opened this issue Mar 20, 2019 · 2 comments

Comments

@optikfluffel
Copy link
Contributor

When doing Hunter.create_status(conn, status_text) without any options, the default is []. This gets passed to Hunter.Status.create_status/3, which makes this empty options list into an empty map. Then it gets passed on to Hunter.Api.HTTPClient.create_status/3 which tries to da a Keyword.put(options, :status, status) onto that empty map.

This then finally results in:

** (FunctionClauseError) no function clause matching in Keyword.put/3    
    
    The following arguments were given to Keyword.put/3:
    
        # 1
        %{}
    
        # 2
        :status
    
        # 3
        "foobar"
    
    Attempted function clauses (showing 1 out of 1):
    
        def put(keywords, key, value) when is_list(keywords) and is_atom(key)
    
    (elixir) lib/keyword.ex:577: Keyword.put/3
@milmazz
Copy link
Owner

milmazz commented Mar 20, 2019

@optikfluffel Hey, thanks for the report and the detail. It should be fixed now, please let me know what do you think.

@optikfluffel
Copy link
Contributor Author

@milmazz yes, seems fine now, thanks again 😁

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

No branches or pull requests

2 participants