Improve API error handling

When zero results are returned from the API, show an appropriate message to the user.