Skip to content

Commit

Permalink
[MODORDERS-1209]. Remove redundant message
Browse files Browse the repository at this point in the history
  • Loading branch information
BKadirkhodjaev committed Dec 9, 2024
1 parent e65dc40 commit bf10e22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/folio/models/claiming/ClaimingError.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
@AllArgsConstructor
public enum ClaimingError {
CANNOT_SEND_CLAIMS_PIECE_IDS_ARE_EMPTY("Cannot send claims, piece ids are empty"),
CANNOT_FIND_PIECES_WITH_LATE_STATUS_TO_PROCESS("Cannot find pieces with LATE status to process"),
CANNOT_RETRIEVE_CONFIG_ENTRIES("Cannot retrieve config entries"),
CANNOT_GROUP_PIECES_BY_VENDOR_MESSAGE("Cannot group pieces by vendor"),
CANNOT_CREATE_JOBS_AND_UPDATE_PIECES("Cannot create jobs and update pieces"),
CANNOT_FIND_A_PIECE_BY_ID("Cannot find a piece by '%s' id"),
CANNOT_FIND_PIECES_WITH_LATE_STATUS_TO_PROCESS("Cannot find pieces with LATE status to process"),
CANNOT_COMPLETE_REQ("Cannot complete request to an optional module mod-data-export-spring is unreachable");

private final String value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static org.folio.models.claiming.ClaimingError.CANNOT_COMPLETE_REQ;
import static org.folio.models.claiming.ClaimingError.CANNOT_CREATE_JOBS_AND_UPDATE_PIECES;
import static org.folio.models.claiming.ClaimingError.CANNOT_FIND_A_PIECE_BY_ID;
import static org.folio.models.claiming.ClaimingError.CANNOT_FIND_PIECES_WITH_LATE_STATUS_TO_PROCESS;
import static org.folio.models.claiming.ClaimingError.CANNOT_GROUP_PIECES_BY_VENDOR_MESSAGE;
import static org.folio.models.claiming.ClaimingError.CANNOT_RETRIEVE_CONFIG_ENTRIES;
import static org.folio.models.claiming.ClaimingError.CANNOT_SEND_CLAIMS_PIECE_IDS_ARE_EMPTY;
Expand All @@ -55,7 +56,6 @@ public class PiecesClaimingService {

private static final String JOB_STATUS = "status";
private static final String EXPORT_TYPE_CLAIMS = "CLAIMS";
private static final String CANNOT_FIND_PIECES_WITH_LATE_STATUS_TO_PROCESS = "Cannot find pieces with LATE status to process";

private final ConfigurationEntriesCache configurationEntriesCache;
private final PieceStorageService pieceStorageService;
Expand Down Expand Up @@ -88,7 +88,7 @@ public Future<ClaimingResults> sendClaims(ClaimingCollection claimingCollection,
return groupPieceIdsByVendorId(pieceIds, requestContext)
.compose(pieceIdsByVendorIds -> {
if (CollectionUtils.isEmpty(pieceIdsByVendorIds)) {
return Future.succeededFuture(createEmptyClaimingResults(CANNOT_FIND_PIECES_WITH_LATE_STATUS_TO_PROCESS));
return Future.succeededFuture(createEmptyClaimingResults(CANNOT_FIND_PIECES_WITH_LATE_STATUS_TO_PROCESS.getValue()));
}
log.info("sendClaims:: Using pieces by vendor id map, map: {}", pieceIdsByVendorIds);
return createJobsByVendor(config, pieceIdsByVendorIds, requestContext);
Expand Down

0 comments on commit bf10e22

Please sign in to comment.