Getting errors with Mojito (mint wrapper)

I am using Mojito, the mint wrapper to make requests but I’ve been getting weird errors.

This is the latest one:

(elixir 1.10.4) lib/keyword.ex:201: Keyword.get(%{}, :pool, true)
May 23 21:14:21 myapp[9538]: (mojito 0.7.7) lib/mojito.ex:199: Mojito.request/1

I suspect it has something to do with pools configuration which I removed but there’s no change. I picked this from the example but still no change in error

use Mix.Config

config :mojito,
  timeout: 2500,
  pool_opts: [
    size: 10,
    destinations: [
      "": [
        size: 20,
        max_overflow: 20,
        pools: 10

I’ll appreciate any kind of help.

Thanks! :smiley:


Judging by the error

(elixir 1.10.4) lib/keyword.ex:201: Keyword.get(%{}, :pool, true)

it seems like something is passing a map to where a keyword list is expected.

Probably here somewhere: mojito/base.ex at dcd9ee803ac55d4f97ce2bc46a3ada4b0922298b · appcues/mojito · GitHub

Can you please show the code that’s responsible for making a request in your app? It’d probably look like Mojito.get(url, headers, %{some: :opts_as_map}) or similar.

1 Like


Thank you for your response and sorry for coming back late to you. You were right, I had a function appending ssl options in the for form of a keyword list in case of https calls. The issue occurred in http calls where I return an empty map in my tiredness. Thank you for the pointer

1 Like