Skip to content

Incomplete rollback compensation when account creation fails after balance creation #1630

@ClaraTersi

Description

@ClaraTersi

In CreateAccount use case, if metadata creation fails after balance was successfully created,
neither the balance nor the account are rolled back, leaving orphaned resources.

Current flow:

  1. Create Account ✓
  2. Create Balance ✓
  3. Create Metadata ✗ → No compensation for steps 1 and 2

Expected: If step 3 fails, delete balance (step 2) and account (step 1).

File: components/onboarding/internal/services/command/create-account.go

Metadata

Metadata

Assignees

Labels

back-endBack-end Issuesdomain:onboardingResponsible for the initial configuration of the ledgergoPull requests that update go code

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions