throw response body as error if unexpected response format