Is your feature request related to a problem? Please describe.
Currently when logging in, if I type a wrong username/password, I have to wait for 2 seconds until I get the response.
This is because instead of returning the auth-call response, a timer is set to 2000 ms. When that timer runs out, a lot of other things are tested before finally actually returning that the actual error was that the username/password combination was wrong.
Context:
https://github.com/aau-giraf/weekplanner/blob/b37bf396816e6592be1fb44f605759cc13d68b9e/lib/screens/login_screen.dart#L42-L55
Describe the solution you'd like
For the BLoC to return as soon as the response is ready.
Additional context
This was found when examining #349. In this issue, there is a code example on how the listen functionality could be used to react to the ApiException thrown by the api_client.
Is your feature request related to a problem? Please describe. Currently when logging in, if I type a wrong username/password, I have to wait for 2 seconds until I get the response. This is because instead of returning the
auth
-call response, a timer is set to 2000 ms. When that timer runs out, a lot of other things are tested before finally actually returning that the actual error was that the username/password combination was wrong. Context: https://github.com/aau-giraf/weekplanner/blob/b37bf396816e6592be1fb44f605759cc13d68b9e/lib/screens/login_screen.dart#L42-L55Describe the solution you'd like For the BLoC to return as soon as the response is ready.
Additional context This was found when examining #349. In this issue, there is a code example on how the
listen
functionality could be used to react to theApiException
thrown by the api_client.