That looks neat. But it also looks to me like your error variant has the wrong arity.<p><pre><code>  def charge_customer({:error, err}), do: {:error, err}
  def charge_customer({:ok, cart}, card) do
</code></pre>
The first one takes a single argument {:error, err}, but the second one takes two arguments, {:ok, cart} and card.<p>Same issue with the keyword list version, your error function doesn&#x27;t take a keyword list at all, just the {:error, err} argument.