ResoCoder / flutter-tdd-clean-architecture-course

https://resocoder.com/flutter-clean-architecture-tdd/
1.99k stars 623 forks source link

Null input throws unhandled exception in InputConverter #27

Open JayPerfetto opened 4 years ago

JayPerfetto commented 4 years ago

You should add the following line to InputConverter before trying to parse the input as an int:

  if (str == null) return Left(InvalidInputFailure());

otherwise an unhandled exception is thrown that is not covered in your exception handling.