check the exception to unexpected responses from the server.
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| import argparse | ||||
| import sys | ||||
| from json import JSONDecodeError | ||||
|  | ||||
| from mdrsclient.commands import ( | ||||
|     ChaclCommand, | ||||
| @@ -52,6 +53,9 @@ def main() -> None: | ||||
|     except MDRSException as e: | ||||
|         print(f"Error: {e}") | ||||
|         sys.exit(2) | ||||
|     except JSONDecodeError: | ||||
|         print("Unexpected response returned. Please check the configuration or the server's operational status.") | ||||
|         sys.exit(2) | ||||
|     except KeyboardInterrupt: | ||||
|         sys.exit(130) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user