+
+ private function checkResponseBody(Response $response, API\ContentType $type) {
+ try {
+ $data = $type->parseBody($response->getBody());
+ } catch (\Exception $e) {
+ $this->api->getLogger()->error("response -> error: ".$e->getMessage(), [
+ "url" => (string) $this->api->getUrl(),
+ ]);
+
+ throw $e;
+ }
+
+ return $data;
+ }