@@ -30,7 +30,7 @@ async def check_server_health(
3030 response .raise_for_status ()
3131 logger .info (f"Upstream API { url !r} is healthy" )
3232 return
33- except Exception as e :
33+ except httpx . ConnectError as e :
3434 logger .warning (f"Upstream health check for { url !r} failed: { e } " )
3535 retry_in = min (retry_delay * (2 ** attempt ), retry_delay_max )
3636 logger .warning (
@@ -69,7 +69,7 @@ async def check_conformance(
6969 )
7070
7171 async with httpx .AsyncClient () as client :
72- response = await client .get (api_url )
72+ response = await client .get (f" { api_url } /conformance" )
7373 response .raise_for_status ()
7474 api_conforms_to = response .json ().get ("conformsTo" , [])
7575 missing = [
@@ -80,11 +80,11 @@ async def check_conformance(
8080 )
8181 ]
8282
83- def print_conformance (conformance ) :
83+ def conformance_str (conformance : str ) -> str :
8484 return f" - { conformance } [{ ',' .join (required_conformances [conformance ])} ]"
8585
8686 if missing :
87- missing_str = [print_conformance (c ) for c in missing ]
87+ missing_str = [conformance_str (c ) for c in missing ]
8888 raise RuntimeError (
8989 "\n " .join (
9090 [
@@ -95,5 +95,5 @@ def print_conformance(conformance):
9595 )
9696 logger .debug (
9797 "Upstream catalog conforms to the following required conformance classes: \n %s" ,
98- "\n " .join ([print_conformance (c ) for c in required_conformances ]),
98+ "\n " .join ([conformance_str (c ) for c in required_conformances ]),
9999 )
0 commit comments