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: GitHubProjectError, GitHubProjectUnknownFieldError, GitHubProjectUnknownFieldOptionError, GitHubProjectUpdateReadOnlyFieldError #132

Merged
merged 29 commits into from
Sep 21, 2023

Conversation

gr2m
Copy link
Owner

@gr2m gr2m commented Aug 20, 2023

Rendered preview of new Errors section in the readme.

closes #128

BREAKING CHANGE: When a field could not be found, the message on the thrown error looked like this

[github-project] "NOPE" could not be matched with any of the existing field names: "Title", "Assignees", "Status", "Labels", "Linked pull requests", "Reviewers", "Repository", "Milestone", "Text", "Number", "Date", "Single select", "Iteration". If the field should be considered optional, then set it to "nope: { name: "NOPE", optional: true}

it is now

Project field cannot be found

The original message can still be retrieved using error.toHumanMessage()

BREAKING CHANGE: When a user value cannot be matched with a field option, the message on the thrown error looked like this

[github-project] "unknown" is an invalid option for "Single select"

it is now

Project field option cannot be found

The original message can still be retrieved using error.toHumanMessage()

BREAKING CHANGE: if a user tried to update a read-only field, the message on the thrown error looked like this

[github-project] Cannot update read-only fields: "Assignees" (.assignees)

it is now

Project read-only field cannot be updated

@gr2m gr2m changed the title docs(README): GitHubProjectError, GitHubProjectErrorUnknownFieldOption docs(README): GitHubProjectError, GitHubProjectUnknownFieldError, GitHubProjectUnknownFieldOptionError, GitHubProjectUpdateReadOnlyFieldError Aug 25, 2023
@gr2m gr2m changed the title docs(README): GitHubProjectError, GitHubProjectUnknownFieldError, GitHubProjectUnknownFieldOptionError, GitHubProjectUpdateReadOnlyFieldError feat: GitHubProjectError, GitHubProjectUnknownFieldError, GitHubProjectUnknownFieldOptionError, GitHubProjectUpdateReadOnlyFieldError Sep 12, 2023
@gr2m gr2m marked this pull request as ready for review September 19, 2023 22:39
Copy link
Collaborator

@tmelliottjr tmelliottjr left a comment

Choose a reason for hiding this comment

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

Minor comments, otherwise looks good!

api/errors.js Outdated Show resolved Hide resolved
api/errors.js Outdated Show resolved Hide resolved
api/errors.js Outdated Show resolved Hide resolved
api/errors.js Outdated Show resolved Hide resolved
Co-authored-by: Tom Elliott <13594679+tmelliottjr@users.noreply.github.com>
@gr2m gr2m merged commit 9437ed7 into main Sep 21, 2023
3 of 4 checks passed
@gr2m gr2m deleted the gr2m/128-custom-errors branch September 21, 2023 05:17
@github-actions
Copy link

🎉 This PR is included in version 5.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Stop leaking user content in error messages
2 participants