recaptcha icon indicating copy to clipboard operation
recaptcha copied to clipboard

Error generated by MockClient isn't the same as the real one

Open digitalcora opened this issue 4 years ago • 0 comments

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.

digitalcora avatar Mar 12 '20 19:03 digitalcora