Raise ValueError when response from API is not 200.