From 7cd9b413c96f16262fff7a8d3f99b2156e081ba6 Mon Sep 17 00:00:00 2001 From: rclarke0 Date: Wed, 11 Sep 2024 16:17:47 -0400 Subject: [PATCH] error handling fix --- abr-testing/abr_testing/data_collection/read_robot_logs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abr-testing/abr_testing/data_collection/read_robot_logs.py b/abr-testing/abr_testing/data_collection/read_robot_logs.py index f4374953c4d..795a940bec6 100644 --- a/abr-testing/abr_testing/data_collection/read_robot_logs.py +++ b/abr-testing/abr_testing/data_collection/read_robot_logs.py @@ -426,7 +426,10 @@ def get_error_info(file_results: Dict[str, Any]) -> Dict[str, Any]: "node", run_command_error.get("errorInfo", {}).get("port", "") ) except (IndexError, KeyError): - error_details = file_results.get("errors", [{}])[0] + try: + error_details = file_results.get("errors", [{}])[0] + except IndexError: + error_details = {} error_type = error_details.get("errorType", "") error_code = error_details.get("errorCode", "") error_instrument = error_details.get("detail", "")