recaptcha
recaptcha copied to clipboard
Error generated by MockClient isn't the same as the real one
Normally an "invalid-input-response" error from reCAPTCHA causes the verify function to return {:error, [:invalid_input_response]}
. However, when using the feature of the MockClient
where the response "invalid_response"
intentionally causes an error, the return is instead {:error, [:"invalid-input-response"]}
. If you have different handling for different reCAPTCHA errors, the consequence is that you have to match on the "fake error" separately from the real one.