Describe the bug
Bloc does not dispatch event once the API Client returns an error. When dispatch method is called no error is reported and mapState is never fired
Git URL https://github.com/adewaleafolabi/portfolio
@adewaleafolabi I took a look and I'm not sure how to reproduce the issue you're having. Can you please give more detailed steps for how to reproduce the issue?
I was able to force an exception and the bloc seems to be working fine.

To reproduce the error:
I supplied a wrong password, the API then returns a 401. Clicking on the login button again is supposed to dispatch a login event, but this time no request to the API is made, no call to mapEventState is called either. Thank you
@adewaleafolabi ah so I wasn鈥檛 supposed to use the mock backend?
@adewaleafolabi I was able to reproduce this only when running in debug mode (webdev serve) however running in release mode (webdev serve --release) behaves as expected.
Looks like the problem is somewhere in dartdevc because by default, webdev serve compiles your app using dartdevc and adding the --release flag uses dart2js.
I would recommend opening an issue for dartdevc because I was also able to confirm that I if take your bloc and run it in a pure dart setting it works as expected.
You can see for yourself by copying this gist and running it using dart ./main.dart
Let me know if that helps! 馃憤
This helps running webdev serve with the release flag does work. I'd raise this issue with dartdevc Thank you
Same here, after fail API, mapEventToState not even called.
Most helpful comment
This helps running webdev serve with the release flag does work. I'd raise this issue with dartdevc Thank you