throw custom exception when API call returns error, make API calls async