Skip to content

Commit 4952c34

Browse files
committed
adjust exception handling for new exception; added clear messages
1 parent 7f382df commit 4952c34

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ jobs:
9696
echo "✅ All positive tests passed."
9797
echo "✅ All positive tests passed." >> $GITHUB_STEP_SUMMARY
9898
else
99-
echo "❌ One or more positive tests failed."
100-
echo "❌ One or more positive tests failed." >> $GITHUB_STEP_SUMMARY
99+
echo "❌ One or more positive tests failed or did not run."
100+
echo "❌ One or more positive tests failed or did not run." >> $GITHUB_STEP_SUMMARY
101101
exit 1
102102
fi
103103

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ runs:
149149
console.error(`❌ Error processing ${{ inputs.label }} results:`, error);
150150
151151
// Detect when user forgot to return a value (causing body = undefined)
152-
if (error.code === 'ERR_INVALID_ARG_TYPE' && /The "data" argument must be of type string/i.test(error.message)) {
152+
if (error instanceof TypeError && /Returned value from user script must be a string/i.test(error.message)) {
153153
console.error(`💡 Hint: Your script returned a non-string value (e.g., object, array, or undefined) — or nothing at all.\n`
154154
+ `Please return a string, or serialize your result using JSON.stringify.\n\n`
155155
+ `For example:\n\n`

0 commit comments

Comments
 (0)