#0 fix - Using better error code for unnecessary renew
| .. | .. |
|---|
| 177 | 177 | LOG.info("Renew license: {}", previousLic); |
|---|
| 178 | 178 | |
|---|
| 179 | 179 | if (previousLic.getExpirationDate().after(DateUtils.addMonths(new Date(), 1))) { |
|---|
| 180 | | - throw new SeCurisServiceException(ErrorCodes.LICENSE_NOT_READY_FOR_RENEW, "The license is still valid, not ready for renew"); |
|---|
| 180 | + throw new SeCurisServiceException(ErrorCodes.UNNECESSARY_RENEW, "The license is still valid, not ready for renew"); |
|---|
| 181 | 181 | } |
|---|
| 182 | 182 | |
|---|
| 183 | 183 | // EntityManager em = emProvider.get(); |
|---|
| .. | .. |
|---|
| 32 | 32 | public static int NOT_FOUND = 1003; |
|---|
| 33 | 33 | public static int INVALID_FORMAT = 1004; |
|---|
| 34 | 34 | public static int WRONG_STATUS = 1005; |
|---|
| 35 | + public static int UNNECESSARY_RENEW = 1006; |
|---|
| 35 | 36 | |
|---|
| 36 | 37 | public static int INVALID_LICENSE_REQUEST_DATA = 1100; |
|---|
| 37 | 38 | public static int LICENSE_NOT_READY_FOR_RENEW = 1101; |
|---|