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

Fix: error thrown when there are no changes to revert #783

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

csansoon
Copy link
Contributor

No description provided.

@@ -191,9 +191,5 @@ export async function computeChangesToRevertCommit(
targetDraftDocuments: documentsInDraft.value,
})

if (changesToRevert.length === 0) {
return Result.error(new ConflictError('No changes to revert'))
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 here you can throw the error and will arrive to onError Can you check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does arrive to the onError handler, yes, but the sentry notification would already have been sent

Copy link
Contributor

Choose a reason for hiding this comment

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

Talked offline. We're over catching errors on NextJS action sentry procedure. We should avoid catching these kind of errors that are not bugs and are intended to be shown to the user.

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.

2 participants