Skip to content

Commit abc50f1

Browse files
Add more error logs when failing (with stack trace) (#64)
* more error log * more logs * Remove useless logs * Try ending the full error to GH * nope * add more log * link to the settings * Indication to follow the stack
1 parent 3bbbe90 commit abc50f1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,19 @@ async function run() {
55
try {
66
await action.action();
77
} catch (error) {
8-
core.setFailed(error.message);
8+
console.error(error);
9+
if (error.message.includes("Resource not accessible by integration")) {
10+
console.info(
11+
`⚠️💡👉 This error might be due to the Github repository settings: make sure that the checkbox "Read and write permissions" is checked here under "Workflows":
12+
https://github.com/mobsuccess-devops/${
13+
process.env.GITHUB_REPOSITORY.split("/")[1]
14+
}/settings/actions`
15+
);
16+
}
17+
core.setFailed(
18+
error.message +
19+
" (please check the logs for the full error and stack trace)"
20+
);
921
}
1022
}
1123

0 commit comments

Comments
 (0)