79201704

Date: 2024-11-18 23:46:15
Score: 1
Natty:
Report link

During high load, the API returned an error response:

{"error":"API limit reached. Please try again later. Remaining Limit: 0"}

I hadn't accounted for these kinds of error responses in my deserialization logic, so the error message couldn’t be deserialized into my List<City> model.

When I replaced the API call with hardcoded JSON data, the deserialization worked fine, confirming that the issue was due to missing error handling for unexpected responses.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Ahmed Fotoh