Skip to content

Commit

Permalink
Add more error logs when failing (with stack trace) (#64)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
philippeauriach committed Jun 6, 2023
1 parent 3bbbe90 commit abc50f1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@ async function run() {
try {
await action.action();
} catch (error) {
core.setFailed(error.message);
console.error(error);
if (error.message.includes("Resource not accessible by integration")) {
console.info(
`⚠️💡👉 This error might be due to the Github repository settings: make sure that the checkbox "Read and write permissions" is checked here under "Workflows":
https://github.com/mobsuccess-devops/${
process.env.GITHUB_REPOSITORY.split("/")[1]
}/settings/actions`
);
}
core.setFailed(
error.message +
" (please check the logs for the full error and stack trace)"
);
}
}

Expand Down

0 comments on commit abc50f1

Please sign in to comment.