Skip to content

Commit a07cc8f

Browse files
committed
ENH: also capture HTTPRequestError during the connection check
1 parent 6709960 commit a07cc8f

File tree

1 file changed

+1
-1
lines changed
  • src/save_and_restore_api/tools

1 file changed

+1
-1
lines changed

src/save_and_restore_api/tools/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def check_connection(SR):
481481
logger.debug("Connecting to the Save-and-Restore service ...")
482482
try:
483483
info = SR.info_get()
484-
except SR.HTTPClientError as ex:
484+
except (SR.HTTPClientError, SR.HTTPRequestError) as ex:
485485
logger.debug("Failed to connect to Save-and-Restore service.")
486486
raise RuntimeError(f"Failed to connect to the Save-and-Restore service: {ex}") from ex
487487
logger.debug(f"Save-and-Restore info:\n{pprint.pformat(info)}")

0 commit comments

Comments
 (0)