fix(accounting): prioritize specific Fineract error messages when AML marking fails
This commit is contained in:
@@ -327,8 +327,11 @@ export class SearchJournalEntryComponent implements OnInit, OnDestroy, AfterView
|
|||||||
},
|
},
|
||||||
error: (err: any) => {
|
error: (err: any) => {
|
||||||
this.marking.delete(entry.id);
|
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 =
|
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.';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user