Skip to content

Commit 154b75d

Browse files
authored
Merge pull request #3 from ruby/fix-unknown-type-error
Fix unknown type error
2 parents 8968f7d + 4d015e7 commit 154b75d

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__tests__/runner/*
22
node_modules
33
package-lock.json
4+
lib

src/main.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ async function run() {
1111

1212
await webhook.send(payload);
1313
} catch (error) {
14-
core.setFailed(error.message);
14+
if(error instanceof Error) {
15+
core.setFailed(error.message);
16+
} else {
17+
core.setFailed("Unexpected error");
18+
}
1519
}
1620
}
1721

0 commit comments

Comments
 (0)