diff options
Diffstat (limited to 'lib/recaptcha.ex')
-rw-r--r-- | lib/recaptcha.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/recaptcha.ex b/lib/recaptcha.ex index 9e6be0f..30a5bd8 100644 --- a/lib/recaptcha.ex +++ b/lib/recaptcha.ex @@ -41,6 +41,8 @@ defmodule Recaptcha do {:error, Enum.map(errors, fn(error) -> atomise_api_error(error) end)} {:ok, %{"success" => true, "challenge_ts" => timestamp, "hostname" => host}} -> {:ok, %Recaptcha.Response{challenge_ts: timestamp, hostname: host}} + {:ok, %{"success" => false, "challenge_ts" => timestamp, "hostname" => host}} -> + {:error, [:challenge_failed]} end end |