fix(accounting): prioritize specific Fineract error messages when AML marking fails

This commit is contained in:
2026-08-03 10:51:07 +05:30
parent 44b41e504a
commit 26091c68b0
@@ -327,8 +327,11 @@ export class SearchJournalEntryComponent implements OnInit, OnDestroy, AfterView
},
error: (err: any) => {
this.marking.delete(entry.id);
// Fineract wraps the real reason in errors[0]; the outer defaultUserMessage
// is the generic "Errors contain reason for domain rule violation", which
// tells the reviewer nothing.
this.markError =
err?.error?.defaultUserMessage || err?.error?.errors?.[0]?.defaultUserMessage || 'Could not mark this entry.';
err?.error?.errors?.[0]?.defaultUserMessage || err?.error?.defaultUserMessage || 'Could not mark this entry.';
}
});
}