Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add error logs #66

Merged
merged 2 commits into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function addAsanaComment(core, token, tasks, comment) {
if (process.env.NODE_ENV === 'test') {
throw exc
}
core.error(`Error while commenting on task(s) (${tasks.map(stripTaskIds)})`)
core.error(`Error while commenting on task(s) (${tasks.map(stripTaskIds)}). Error: ${exc.message}`)
}
}

Expand Down Expand Up @@ -181,7 +181,7 @@ const utils = (core, github, githubToken, asanaToken) => {
)
core.info(`completed task(s) (${tasks.map(stripTaskIds)})`)
} catch (exc) {
core.error(`Error while completing task(s) (${tasks.map(stripTaskIds)})`)
core.error(`Error while completing task(s) (${tasks.map(stripTaskIds)}). Error: ${exc.message}`)
}
}

Expand Down Expand Up @@ -216,7 +216,7 @@ const utils = (core, github, githubToken, asanaToken) => {
)}) to sections/${validSectionIds}/addTask`,
)
} catch (exc) {
core.error(`Error while posting task(s) (${tasks.map(stripTaskIds)})`)
core.error(`Error while posting task(s) (${tasks.map(stripTaskIds)}). Error: ${exc.message}`)
}
}

Expand Down Expand Up @@ -285,7 +285,7 @@ const utils = (core, github, githubToken, asanaToken) => {
).get()
return { projectId, sections: data }
} catch (err) {
core.error(`Failed to fetch project ${projectId}`)
core.error(`Failed to fetch project ${projectId}. Error: ${err.message}`)
return {}
}
}),
Expand Down
Loading