public function fromResponse(RequestInterface $request, Response $response)
	{
		$message = $response->json();

		$parts = array(
			'type' => isset($message['error']) ? $message['error'] : null,
			'description' => isset($message['description']) ? $message['description'] : null,
			'request_id' => $response->getHeaders()->get('x-kinvey-request-id'),
			'debug' => isset($message['debug']) && !empty($message['debug']) ? $message['debug'] : null,
		);

		return $this->createException($request, $response, $parts);
	}