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: friendly error messages, add review comment output #374

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

mtfoley
Copy link
Owner

@mtfoley mtfoley commented Aug 24, 2023

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 👷 Optimization
  • 📝 Documentation Update
  • 🔖 Release
  • 🚩 Other

Description

Adds try/catch blocks around octokit REST api calls to allow friendly error messages.
Adds new output for "review-comment" that will be set whenever the review comment body is known.

Related Tickets & Documents

Resolves #368

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 readme
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

src/main.ts Outdated
state: 'closed'
})
} catch (error) {
if (error instanceof Error) throw new Error(errors.closingPullRequest)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'd want to somehow log the original error regardless.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new commit just dropped - still haven't smoke tested, buyer beware

@JoshuaKGoldberg
Copy link
Contributor

👋 ping @mtfoley - is there anything I can do to help here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Give a better error than "Resource not accessible by integration" when permissions lacking
2 participants