Skip to content

fix: improve API error handling with detailed messages#43

Open
prisha-sh wants to merge 1 commit into
ashujsrfox:ashujsrfox-patch-1from
prisha-sh:fix-api-error-messages
Open

fix: improve API error handling with detailed messages#43
prisha-sh wants to merge 1 commit into
ashujsrfox:ashujsrfox-patch-1from
prisha-sh:fix-api-error-messages

Conversation

@prisha-sh

Copy link
Copy Markdown
Contributor

📝 Description

Improves API error handling by displaying clear and user-friendly messages for different failure scenarios such as invalid city, network issues, and general API errors. This enhances user experience and prevents confusion during failed requests.

🔗 Related Issue

Closes #37

🔄 Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔍 SEO improvement
  • 🎨 Style / UI improvement
  • ♿ Accessibility improvement
  • 📝 Documentation
  • ⚙️ CI / configuration
  • 🧹 Refactor / cleanup

🧪 How to Test

  1. Search for a valid city → data loads normally
  2. Search for an invalid city → shows "City not found"
  3. Turn off internet → shows "Network error, please try again"
  4. Simulate API failure → shows "Something went wrong"
  5. UI remains stable and allows retry

📸 Screenshots (if applicable)

N/A

✅ Checklist

  • My code follows the project's existing style
  • I have tested my changes
  • I have linked the related issue above
  • My PR title follows Conventional Commits format

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.

Improve API error handling with detailed messages

1 participant