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

Hanlde limiter rejection on UI side #256

Closed
umputun opened this issue Jan 17, 2019 · 5 comments
Closed

Hanlde limiter rejection on UI side #256

umputun opened this issue Jan 17, 2019 · 5 comments
Labels
Milestone

Comments

@umputun
Copy link
Owner

umputun commented Jan 17, 2019

With 2a3051c I have added more aggressive limiter/throttler for update/create requests. It covers
Put("/comment/{id}"), Post("/comment"),Put("/vote/{id}") and Post("/deleteme"), all under /api/v1

Most of those limits are really hard to trigger from UI, except vote. Currently, if the user doing massive voting and got throttled, there is no indication of this rejection on UI side. For the user, it looks like all the votes passed/accepted, but after a refresh, they will see the real results.

Not sure what the right/best way to handle it on UI side.

@igoradamenko @Reeywhaar - any bright ideas?

@igoradamenko
Copy link
Collaborator

igoradamenko commented Jan 17, 2019

If it heads to prevent aggressive requests, then maybe it's fine that user doesn't get proper feedback from UI? Let him think that everything is fine ¯\_(ツ)_/¯

@umputun
Copy link
Owner Author

umputun commented Jan 17, 2019

and another one, not related directly but similar: blocked user rejected without any explanation/indication in login. Not even "authentication rejected" or smth like this.

@umputun
Copy link
Owner Author

umputun commented Jan 17, 2019

@igoradamenko maybe not be a bad idea, and the best part of this - nothing more to do ;)

however, I can see a practical issue with this: user voted by mistake and tried to change it fast

@Reeywhaar
Copy link
Collaborator

Well, Put("/comment/{id}"), Post("/comment") already handled, I think standard error will be shown, like here but Something went wrong. Please try again a bit later., though this message can be clarified.

As for votes I think standard way is to introduce notification component like here (click "show"). Preact component exists in rtnews-ui for example. Though one complication is that everything works in iframe, and we'll have to make third iframe (comments, user comments, notifications) with data url and work this way through pushing messages. Or maybe try to work it out without iframe.

Another way is to show something right in place of voting buttons, but I'm afraid that response from server could arrive late, already after user voted and scrolled somewhere so buttons get behind viewport and notification will be unnoticed.

I can partially agree with @igoradamenko. No one died because of voting system on Reddit yet :-) But I think something should notice user of error in case of network error for example.

@Reeywhaar
Copy link
Collaborator

Guess, this can be closed as well?

@umputun umputun added this to the v1.3 milestone Apr 21, 2019
@umputun umputun closed this as completed Apr 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants