diff --git a/src/targets/chat.js b/src/targets/chat.js
index ede57d7..fb74265 100644
--- a/src/targets/chat.js
+++ b/src/targets/chat.js
@@ -111,7 +111,7 @@ function getFailureDetails(suite) {
for (let i = 0; i < cases.length; i++) {
const test_case = cases[i];
if (test_case.status === 'FAIL') {
- text += `Test: ${test_case.name}
Error: ${truncate(test_case.failure, 150)}
`;
+ text += `Test: ${test_case.name}
Error: ${truncate(test_case.failure ?? 'N/A', 150)}
`;
}
}
return text;
diff --git a/src/targets/slack.js b/src/targets/slack.js
index a627911..8e7b335 100644
--- a/src/targets/slack.js
+++ b/src/targets/slack.js
@@ -129,7 +129,7 @@ function getFailureDetails(suite) {
for (let i = 0; i < cases.length; i++) {
const test_case = cases[i];
if (test_case.status === 'FAIL') {
- text += `*Test*: ${test_case.name}\n*Error*: ${truncate(test_case.failure, 150)}\n\n`;
+ text += `*Test*: ${test_case.name}\n*Error*: ${truncate(test_case.failure ?? 'N/A', 150)}\n\n`;
}
}
return {
diff --git a/src/targets/teams.js b/src/targets/teams.js
index 7f1ab41..8a30e4f 100644
--- a/src/targets/teams.js
+++ b/src/targets/teams.js
@@ -183,7 +183,7 @@ function getFailureDetailsFactSets(suite) {
},
{
"title": "Error:",
- "value": truncate(test_case.failure, 150)
+ "value": truncate(test_case.failure ?? 'N/A', 150)
}
]
});