From 4ec465f0a2a918eb14a4684626aed111eec07657 Mon Sep 17 00:00:00 2001 From: Igor-Davidyuk Date: Mon, 5 Aug 2024 13:35:45 +0200 Subject: [PATCH] allow text response on CS request Signed-off-by: Igor-Davidyuk --- geti_sdk/rest_clients/credit_system_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/geti_sdk/rest_clients/credit_system_client.py b/geti_sdk/rest_clients/credit_system_client.py index 9707ae80..0459474a 100644 --- a/geti_sdk/rest_clients/credit_system_client.py +++ b/geti_sdk/rest_clients/credit_system_client.py @@ -61,9 +61,13 @@ def is_supported(self) -> bool: :return: True if the Credit System is supported, False otherwise. """ + # Send a GET request to the balance endpoint to check if the Credit System is supported. + # The text response is allowed to check if the server responds with a default + # html page in case the Credit System is not supported. r = self.session.get_rest_response( url=self.session.base_url + "balance", method="GET", + allow_text_response=True, ) if isinstance(r, dict): # If the Platform responds with the information about the available subscriptions,