How to handle different recaptcha errors on the frontend?
- I am using recaptcha v2 invisible on my Nuxt SSR website with the help of this module
- I added it to my login, signup, forgot password and reset password pages
3 Recaptcha Error Conditions
- There are 3 types of conditions I need to handle
- First one, when the recaptcha failed on the frontend (either when Google magically determines you are a bot or you are really bad at identifying traffic signals and bicycles)
- Second one, when the recaptcha has expired, maybe it asked you to identify traffic signals while you were eating a burger
- Third one, when the recaptcha token actually fails verification on the backend. You are supposed to ideally send the token to your backend server where you again verify it
My question
- How to handle these errors?
- Should I tell the user that this is a recaptcha error or tell something went wrong in a generic manner
What am I doing currently? Condition 1
Condition 2