diff --git a/fedn/network/api/client.py b/fedn/network/api/client.py index aca36cbdc..344ae6453 100644 --- a/fedn/network/api/client.py +++ b/fedn/network/api/client.py @@ -645,10 +645,9 @@ def start_session( headers=self.headers, ) - if id is None: - id = response.json()["session_id"] - if response.status_code == 201: + if id is None: + id = response.json()["session_id"] response = requests.post( self._get_url_api_v1("sessions/start"), json={