diff --git a/src/giskard_hub/_base_client.py b/src/giskard_hub/_base_client.py index 8d153fe..96ff5df 100644 --- a/src/giskard_hub/_base_client.py +++ b/src/giskard_hub/_base_client.py @@ -75,7 +75,11 @@ def delete(self, path: str, **kwargs): return self._request("DELETE", path, **kwargs) def close(self): - self._http.close() + try: + self._http.close() + except AttributeError: + # This may happen if the client was not properly initialized yet + pass def __del__(self): self.close()