Skip to content

fix(album): roll back failed database transactions - #3760

Open
joshtrichards wants to merge 2 commits into
masterfrom
jtr/fix-album-transaction-rollbacks
Open

fix(album): roll back failed database transactions#3760
joshtrichards wants to merge 2 commits into
masterfrom
jtr/fix-album-transaction-rollbacks

Conversation

@joshtrichards

Copy link
Copy Markdown
Member

Ensure album database transactions are rolled back when an exception occurs during multi-step operations.

Prevents partial collaborator updates or album deletions when a later database operation fails.

  • Roll back the transaction and rethrow the original exception when setCollaborators() fails.
  • Apply the same transaction-safety pattern to delete().
  • Catch \Throwable so both exceptions and PHP errors cannot leave a transaction open.
  • Preserve the existing commit behavior when all operations complete successfully.

Since this was a tiny fix didn't think bother to use the TTransactional helper.

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added bug Something isn't working 3. to review Waiting for reviews labels Aug 16, 2026
@joshtrichards
joshtrichards requested a review from artonge August 16, 2026 22:51
Signed-off-by: Josh <josh.t.richards@gmail.com>
@susnux

susnux commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Linting needs to be fixed

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

Labels

3. to review Waiting for reviews bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants