Skip to content

Enhancements for Error Handling and Input Validation#1

Open
Ludusm11 wants to merge 1 commit intoYann-GitHub:mainfrom
Ludusm11:patch-1
Open

Enhancements for Error Handling and Input Validation#1
Ludusm11 wants to merge 1 commit intoYann-GitHub:mainfrom
Ludusm11:patch-1

Conversation

@Ludusm11
Copy link
Copy Markdown

@Ludusm11 Ludusm11 commented Oct 3, 2024

  • Added error handling for failed API requests (e.g., invalid city or API issues).
  • Improved input validation by trimming spaces and handling empty city input.
  • Used .get() to prevent KeyError when accessing potentially missing fields in the API response.
  • Displayed a custom error page when a city is not found in the API response.
  • Ensured the application does not crash when API data is incomplete or unavailable.

- Added error handling for failed API requests (e.g., invalid city or API issues).
- Improved input validation by trimming spaces and handling empty city input.
- Used .get() to prevent KeyError when accessing potentially missing fields in the API response.
- Displayed a custom error page when a city is not found in the API response.
- Ensured the application does not crash when API data is incomplete or unavailable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant