Skip to content

Commit

Permalink
Feature/SK-1236 | Error-specific info when failing to connect client (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminastrand authored Dec 2, 2024
1 parent 343088c commit 74d400f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fedn/network/clients/fedn_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,9 @@ def connect_to_api(self, url: str, token: str, json: dict) -> Tuple[ConnectToApi
elif response.status_code == 404:
logger.warning("Connect to FEDn Api - Incorrect URL")
return ConnectToApiResult.IncorrectUrl, "Incorrect URL"
except Exception:
pass

logger.warning("Connect to FEDn Api - Unknown error occurred")
return ConnectToApiResult.UnknownError, "Unknown error occurred"
except Exception as e:
logger.warning(f"Connect to FEDn Api - Error occurred: {str(e)}")
return ConnectToApiResult.UnknownError, str(e)

def download_compute_package(self, url: str, token: str, name: str = None) -> bool:
"""Download compute package from controller
Expand Down

0 comments on commit 74d400f

Please sign in to comment.