Skip to content

Add distinct error messages for city not found vs API/network failures#271

Open
Muskankr wants to merge 1 commit into
thetechguardians:mainfrom
Muskankr:fix/weather-error-handling
Open

Add distinct error messages for city not found vs API/network failures#271
Muskankr wants to merge 1 commit into
thetechguardians:mainfrom
Muskankr:fix/weather-error-handling

Conversation

@Muskankr

Copy link
Copy Markdown

Fixes #265

Changes:

  • Added explicit error handling in /weather endpoint for:
    • City not found (404)
    • API outage (500)
    • Timeout (504)
    • Network failure (503)
  • Updated frontend script.js to display inline error messages.

Result:
Users now see clear, distinct error messages instead of a generic failure, improving usability and debugging.

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.

"City not found" and "API/network failure" show the same generic error

1 participant