Lacerte / clima

MOVED TO https://codeberg.org/Lacerte/clima
Mozilla Public License 2.0
105 stars 14 forks source link

App throws error when invalid city name is given #134

Closed triallax closed 3 years ago

triallax commented 3 years ago

On the latest master, putting in an invalid city name causes the app to throw an error:

E/flutter (20602): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Instance of 'Error' E/flutter (20602): #0 WeatherRepoImpl.getWeather. (package:clima_data/repos/weather_repo_impl.dart:42:34) E/flutter (20602): #1 WeatherRepoImpl.getWeather. (package:clima_data/repos/weather_repo_impl.dart:42:22) E/flutter (20602): #2 Either.getOrElse. (package:dartz/src/either.dart:11:44) E/flutter (20602): #3 Left.fold (package:dartz/src/either.dart:180:63) E/flutter (20602): #4 Either.getOrElse (package:dartz/src/either.dart:11:28) E/flutter (20602): #5 WeatherRepoImpl.getWeather (package:clima_data/repos/weather_repo_impl.dart:42:12) E/flutter (20602): E/flutter (20602): #6 CityRepoImpl.setCity (package:clima_data/repos/city_repo_impl.dart:43:21) E/flutter (20602): E/flutter (20602): #7 CityStateNotifier.setCity (package:clima_ui/state_notifiers/city_state_notifier.dart:76:6) E/flutter (20602): E/flutter (20602): #8 LocationScreen.build. (package:clima_ui/screens/weather_screen.dart:95:11) E/flutter (20602): E/flutter (20602):

prestosole commented 3 years ago

Do you mean the Invalid City Name snackBar error?

triallax commented 3 years ago

No, it literally throws an error.

prestosole commented 3 years ago

That's really weird. Do you have an idea why this's happening?

triallax commented 3 years ago

Nope. I'll investigate later.