Raise RequestError if response from API indicates non-success.