Skip to content

Commit

Permalink
error handling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rclarke0 committed Sep 11, 2024
1 parent 5e1c3c1 commit 7cd9b41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion abr-testing/abr_testing/data_collection/read_robot_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")
Expand Down

0 comments on commit 7cd9b41

Please sign in to comment.