The population service of WorldExplorer might be coded defensively, but we should have proof that it will fail gracefully when issues arise.
Here are some examples of things that could go wrong:
- The network could be down when we make a request or before we receive a result.
- The server might be unavailable.
- The server might return unexpected data (for example, missing data, incorrect types, HTTP errors, and many others).
- The code making use of the service could provide invalid input (for example, for the dateRange property, for the country property, and many others).
- We might have forgotten to handle some error types.
- We might have forgotten to perform some validations.
- Maybe our code will break if too many results ...