rsanchez
2017-06-30 fae5dda8fc235aff2f30301ea06d3d6eb4783380
#0 fix - Using better error code for unnecessary renew
2 files modified
changed files
securis/src/main/java/net/curisit/securis/services/ApiResource.java patch | view | blame | history
securis/src/main/java/net/curisit/securis/services/exception/SeCurisServiceException.java patch | view | blame | history
securis/src/main/java/net/curisit/securis/services/ApiResource.java
....@@ -177,7 +177,7 @@
177177 LOG.info("Renew license: {}", previousLic);
178178
179179 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");
181181 }
182182
183183 // EntityManager em = emProvider.get();
securis/src/main/java/net/curisit/securis/services/exception/SeCurisServiceException.java
....@@ -32,6 +32,7 @@
3232 public static int NOT_FOUND = 1003;
3333 public static int INVALID_FORMAT = 1004;
3434 public static int WRONG_STATUS = 1005;
35
+ public static int UNNECESSARY_RENEW = 1006;
3536
3637 public static int INVALID_LICENSE_REQUEST_DATA = 1100;
3738 public static int LICENSE_NOT_READY_FOR_RENEW = 1101;