Borrower self-create idempotency + orphan compensation; don't relay an empty checklist as success

FixSecurityService
Shipped
July 7, 2026 at 7:21 PM UTC
Author
Kamo
Commit
16b3702

MortgageAppController.create() borrower self-create branch: - Idempotency (#2): resume an existing owned DRAFT via findOwnedDraft instead of minting a duplicate blank on a double-click / reload / second tab / retry. - Atomicity (#5): if stampOwnershipAndGet fails after createBlank committed, delete the just-created blank so a failed mint never orphans an account-less, borrower-invisible DRAFT app in the pipeline. listDocumentRequirements (#4): MlosDocClient.exchange returns a non-2xx ResponseEntity (not a throw) on a downstream 4xx/5xx, so the swallowed, discarded generate result could mask a real failure. Now capture it; when generation FAILED and the raw checklist is still EMPTY, return a retryable 503 instead of a bare HTTP 200 empty list — otherwise a borrower reads "no documents required" and stalls forever. Emptiness is checked on the raw body before party-scoping so a legitimate "no docs for your party" isn't masked.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing