FINERACT-176: During allocation and settle cash for a cashier if valid inputs are not given then error message displayed as Unknown data integrity issue#5473
Conversation
|
Hello, make sure that the PR title is "FINERACT-176: During allocation and settle cash for a cashier if valid inputs are not given then error message displayed as Unknown data integrity issue" |
d1ce6ec to
955d785
Compare
Just changed! Sorry about that. |
|
Hey @IOhacker, do you think you could run the tests again for me? I just investigated the test failure, and wrote my findings below. I think it might be just flaky tests. Originally, I thought the tests were failing because there was a test that expected a different output than the error I threw. However, after looking more deeply, the tests failed seem to be unrelated. testSavingsInterestPosting_Works_ForMultipleAccounts and testLoanCOBPartitioningQuery don't seem to touch the validateForCashTxnForCashier method. To reconfirm, I ran locally and didn't get any failures.
|
| final String currencyCode = this.fromApiJsonHelper.extractStringNamed(CURRENCY_CODE, element); | ||
| baseDataValidator.reset().parameter(CURRENCY_CODE).value(currencyCode).notExceedingLengthOf(3); | ||
|
|
||
| throwExceptionIfValidationWarningsExist(dataValidationErrors); |
There was a problem hiding this comment.
Please cover with a unit or integration tests!
There was a problem hiding this comment.
Yes sir! I'll get on it now.
There was a problem hiding this comment.
All done! I tried to follow other existing tests for my code, but please let me know if I missed anything.
- Fixed missing throw exception for validation errors in Teller Module - added unit tests to confirm changes to TellerCommandFromApiJsonDeserializer ReportedBy: subramanyasn
955d785 to
1ab5390
Compare
|
LGTM |


JIRA: FINERACT-176
ReportedBy: subramanyasn
Issue
Before any changes, the backend was returning a error.msg.teller.unknown.data.integrity.issue when there is no input on cash transactions in the teller module. This was because the error was being built in the validator, but there was no throw statement.
I verified using Postman, and replicated the issue on the backend.

Here is the proper validation with error as expected (after changes).

I also verified this issue by testing on a dev server. The issue was circumvented by greying out the Submit button when no input is entered. However, I believe it's better to handle this issue in the backend, since it's expected behavior.

Fix
Added throwExceptionIfValidationWarningsExist(() to the validateForCashTxnForCashier method in the TellerCommandFromApiJsonDeserializer.
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Your assigned reviewer(s) will follow our guidelines for code reviews.