Skip to content

Fix rollback exception propagating#1737

Closed
nsauk wants to merge 3 commits into
12from
fix-tx-rollback
Closed

Fix rollback exception propagating#1737
nsauk wants to merge 3 commits into
12from
fix-tx-rollback

Conversation

@nsauk

@nsauk nsauk commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

Changes in Transaction#rollback #1736 lead to the issue with a dependent app's ability to handle failed validation, resulting in HTTP 200 in places where HTTP 422 was before. This PR restores the behavior.

@nsauk
nsauk marked this pull request as draft March 18, 2026 20:41
@nsauk
nsauk marked this pull request as ready for review March 18, 2026 20:52
@nsauk
nsauk requested a review from klobuczek March 18, 2026 20:52
Comment on lines +135 to +137
errors = ActiveGraph::Base.transaction do
student.update(name: nil)
student.errors.full_messages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This may look unnatural, but graphiti performs validations inside the transaction.

@klobuczek

klobuczek commented Mar 19, 2026

Copy link
Copy Markdown
Member

@nsauk I created an alternative way to solve it #1738. It fixes my faulty refactoring in the previous PR.

@nsauk nsauk closed this Mar 19, 2026
@nsauk
nsauk deleted the fix-tx-rollback branch March 19, 2026 23:11
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