Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle different return results when doing grant captcha #1794

Closed
NejcZdovc opened this issue Oct 23, 2018 · 2 comments · Fixed by brave/brave-core#721
Closed

Handle different return results when doing grant captcha #1794

NejcZdovc opened this issue Oct 23, 2018 · 2 comments · Fixed by brave/brave-core#721

Comments

@NejcZdovc
Copy link
Contributor

NejcZdovc commented Oct 23, 2018

Server returns this errors when you do grant captcha

403 Unauthorized - Client has failed captcha
404 Not Found - Promotion or wallet specified do not exist
410 Gone - No more grants are available for this promotion
422 Bad Data - Malformed client request, should not be retried

We should handle all of them. Currently we only handled 402.

For 404 and 410 we should display error that grant ended and provide button to close (action is the same as pressing X). It should also remove claim banner at the top.

When you get 422 we should display error and say please try claiming again later. There should be ok button that do the same as close button in previous scenario.

@NejcZdovc
Copy link
Contributor Author

cc @brad @davidtemkin for text for both new screens

@srirambv
Copy link
Contributor

srirambv commented Oct 29, 2018

Verification passed on

Brave 0.55.21 Chromium: 70.0.3538.77 (Official Build) (64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Linux

Verification Passed on

Brave 0.55.21 Chromium: 70.0.3538.77 (Official Build) (64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Windows

image

Verified passed with

Brave 0.56.7 Chromium: 70.0.3538.77 (Official Build) beta(64-bit)
Revision 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS Mac OS X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment