Steps to reproduce:
- Follow steps from Bug— remove tester7 from a team, then have tester7 attempt to create "Team Seven"
- Observe the HTTP 500 response on POST /api/teams/portal/create-team
- Navigate to Browse Teams
Expected behavior:
If the team creation fails with HTTP 500, no team record should be written to the database. The operation should be fully atomic — either it succeeds completely or rolls back entirely.
Actual behavior:
- Despite the HTTP 500 response, "Team Seven" appears in Browse Teams
- The team has 0 members — tester7 is not assigned as owner or member
- Tester7 has no access to the team and cannot manage or delete it
- An orphaned, ownerless team record exists in the database
Steps to reproduce:
Expected behavior:
If the team creation fails with HTTP 500, no team record should be written to the database. The operation should be fully atomic — either it succeeds completely or rolls back entirely.
Actual behavior: