Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-paulo-parity committed Sep 2, 2021
1 parent 2a932f0 commit 0026b2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function BenchContext(app, config) {
stdout = err.stdout.toString()
stderr = err.stderr.toString()
} else {
app.log.error({ msg: "Caught exception in command execution", err })
app.log.fatal({ msg: "Caught exception in command execution", err })
}
}

Expand Down
13 changes: 6 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ const githubCommentLimitTruncateMessage = "<truncated>..."

module.exports = (app) => {
for (const event of ["uncaughtException", "unhandledRejection"]) {
process.on(event, function(error, origin) {
app.log.error(`Caught error ${error}\nFrom origin ${origin}`)
process.on(event, function (error, origin) {
app.log.fatal(
`Caught error ${error}${origin ? `\nFrom origin ${origin}` : ""}`,
)
process.exit(1)
})
}
Expand Down Expand Up @@ -61,10 +63,7 @@ module.exports = (app) => {

const getPushDomain = async function () {
const token = (
await authInstallation({
type: "installation",
installationId,
})
await authInstallation({ type: "installation", installationId })
).token

const url = `https://x-access-token:${token}@github.com`
Expand Down Expand Up @@ -176,7 +175,7 @@ ${extraInfo}
body,
})
} catch (error) {
app.log.error(error)
app.log.fatal(error)
await context.octokit.issues.createComment(
context.issue({
body: `Exception caught: \`${error.message}\`\n${error.stack}`,
Expand Down

0 comments on commit 0026b2d

Please sign in to comment.