FINERACT-1724: Fineract Idempotency status null fix

- [x] Return 500 when the idempotency status is inconsistent in the database
- [x] Unit test for the mapper to avoid NullPointerException
This commit is contained in:
Janos Haber
2023-06-30 13:33:57 +02:00
committed by Adam Saghy
parent 69a2ba0109
commit 4c7c3544d2
2 changed files with 66 additions and 0 deletions
@@ -34,6 +34,10 @@ public class IdempotentCommandProcessFailedException extends AbstractIdempotentC
}
public Integer getStatusCode() {
// If the database inconsistent we return http 500 instead of null pointer exception
if (statusCode == null) {
return 500;
}
return statusCode;
}
}