This commit is contained in:
Pablo Martin 2023-08-03 14:34:49 +02:00
parent ad4bc8c0da
commit d8f6548626

View file

@ -22,14 +22,14 @@ logger = logging.getLogger()
def check_health(): def check_health():
logger.info( logger.info(
f"Connecting to the configured woocomerce at {API_CONFIG['URL']}" f"Connecting to the configured WooCommerce at {API_CONFIG['URL']}"
) )
try: try:
api_reported_version = WC_API.get("").json()["namespace"] api_reported_version = WC_API.get("").json()["namespace"]
except: except:
raise ConnectionError( raise ConnectionError(
"There was an issue connecting to the woocomerce API." "There was an issue connecting to the WooCommerce API."
) )
logger.info(f"Informed version of the API: {API_CONFIG['VERSION']}") logger.info(f"Informed version of the API: {API_CONFIG['VERSION']}")