GDGC-MET / Weather_App

A simple weather app that provides real-time weather information for any location using the OpenWeatherMap API.
https://gdgc-met.github.io/Weather_App/
MIT License
2 stars 31 forks source link

Improve Error Handling for Invalid City Names #12

Open omjadhav8830 opened 5 days ago

omjadhav8830 commented 5 days ago

Currently, when a user enters an invalid city name, the app does not provide clear feedback. It either shows no data or behaves unexpectedly. This can lead to a poor user experience as users may not understand why they are not seeing the weather information.

The app should display a user-friendly error message indicating that the city name is invalid and prompt the user to enter a valid city name.

Autocomplete for City Names: Implementing an autocomplete feature to suggest valid city names as users type, reducing the likelihood of entering invalid city names. Default Fallback City: Setting a default city to display weather information if the entered city name is invalid, ensuring that users always see some weather data. Detailed Error Descriptions: Providing more detailed error messages that include possible reasons for the invalid input, such as typos or non-existent cities.

Screenshot 2024-10-14 135559