You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(project-creation): Rollback everything if rules requests fail (#92099)
**Problem**
Right now, even if creating a rule fails, the project still gets created
— and that’s not ideal. Users might decide not to go through with the
project if the rules don’t work, but when they check the projects
dashboard, the project is already there (without the rules they set up).
That’s confusing and shouldn’t happen.
**Solution**
It all feels like a single form submission, but under the hood, up to
three different requests might be fired to create a project, custom
rules and notification rules. This PR updates the logic so that if any
of those requests fail inside the try-catch, the project gets deleted.
Thanks to the delete cascade constraint, everything linked to the
project gets cleaned up too.
closes TET-529
0 commit comments