Skip to content

Conversation

@priscilawebdev
Copy link
Member

closes https://linear.app/getsentry/issue/TET-1369/user-confusion-when-project-creation-fails-but-succeeds

Example (after the fix):

Screen.Recording.2025-11-12.at.07.04.16.mov

@linear
Copy link

linear bot commented Nov 12, 2025

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 12, 2025
@priscilawebdev priscilawebdev marked this pull request as ready for review November 12, 2025 07:50
@priscilawebdev priscilawebdev requested a review from a team as a code owner November 12, 2025 07:50
return {project, notificationRule, ruleIds};
} catch (error) {
// Attach project for rollback
(error as RequestError & {createdProject: Project}).createdProject = project;
Copy link
Member

Choose a reason for hiding this comment

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

hmmm, I would prefer a type safe alternative. Why are we not doing the rollback in this hook where we have all the information?

Copy link
Member Author

Choose a reason for hiding this comment

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

do you mean the rollback right here or inside of the onError of this hook?

Copy link
Member

Choose a reason for hiding this comment

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

yes.
for me it would make sense as it is the responsibility of the hook to orchestrate those two requests. As soon as we do it outside the hook, we actually need knowledge about its internals.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes it makes sense. will update the code! thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants