diff --git a/src/main/java/eu/openaire/urls_controller/services/StatsServiceImpl.java b/src/main/java/eu/openaire/urls_controller/services/StatsServiceImpl.java index 2d497c4..ef0da24 100644 --- a/src/main/java/eu/openaire/urls_controller/services/StatsServiceImpl.java +++ b/src/main/java/eu/openaire/urls_controller/services/StatsServiceImpl.java @@ -27,7 +27,7 @@ public class StatsServiceImpl implements StatsService { public ResponseEntity getNumberOfPayloads(String getNumberQuery, String message, int retryCount) { if ( retryCount > 10 ) { - String errorMsg = "Could not find the requested payload-type table in an non-merging state, after " + retryCount + " retries!"; + String errorMsg = "Could not find the requested payload-type table in an non-merging state, after " + (retryCount -1) + " retries!"; logger.error(errorMsg); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMsg); } @@ -59,7 +59,7 @@ public class StatsServiceImpl implements StatsService { public ResponseEntity getNumberOfRecordsInspectedByServiceThroughCrawling(int retryCount) { if ( retryCount > 10 ) { - String errorMsg = "Could not find the requested attempt table in an non-merging state, after " + retryCount + " retries!"; + String errorMsg = "Could not find the requested attempt table in an non-merging state, after " + (retryCount -1) + " retries!"; logger.error(errorMsg); return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(errorMsg); }