Closed aksonov closed 4 years ago
@bengtan we can't just swallow the error because the user can't move on to the next screen without picking a unique handle. We have to show some UI to explain what they did wrong so they have some direction to correct the problem.
@southerneer:
We have to show some UI to explain what they did wrong so they have some direction to correct the problem.
There is UI. The form displays 'Not available' above the handle field.
Ah, then I agree that we don't need the alert
Beng,
It is not good practice - ignore touch events. Also some rare race condition could happen - if username was available before saving
Отправлено с iPhone
10 марта 2020 г., в 08:05, Eric Kirkham notifications@github.com написал(а):
Ah, then I agree that we don't need the alert
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Hmmm, just thinking about this a bit more.
How about an alternative solution?
Instead of showing an alert dialog, how about just catching the 'has already been taken' exception and silently ignoring it? All other exceptions get passed on ie. re-thrown.
For me, I just want to prevent non-serious (ie. 'has already been taken') exceptions crashing code unnecessarily. But for all other unknown exceptions, it's fine for it to be passed upwards ... so that eventually it'll appear in bugsnag and we'll look at it then.
This alternative would also bypass this potential topic: