Skip to content

Commit

Permalink
Change error message
Browse files Browse the repository at this point in the history
  • Loading branch information
PasinduYeshan committed Feb 16, 2024
1 parent fb2dadc commit f1203ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public class ResponseCodeConstants {

public static final int CODE_PAYLOAD_TOO_LARGE = 413;
public static final String DESC_PAYLOAD_TOO_LARGE = "{\"maxOperations\": 1000,\"maxPayloadSize\": 1048576}";
public static final String ERROR_DESC_MAX_OPERATIONS_EXCEEDED = "Bulk operation count exceeds the maximum " +
"allowed limit.";
public static final String ERROR_DESC_MAX_OPERATIONS_EXCEEDED = "The number of operations in the bulk " +
"request: %d exceeds the maximum total number of operations count: %d.";

public static final int CODE_INTERNAL_ERROR = 500;
public static final String DESC_INTERNAL_ERROR = "An internal error.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ public SCIMResponse processBulkData(String data, UserManager userManager) {
bulkRequestDataObject.getRoleOperationRequests().size() +
bulkRequestDataObject.getRoleV2OperationRequests().size();
if (totalOperationCount > maxOperationCount) {
throw new PayloadTooLargeException(String.format("%s Actual: %d, Max allowed: %d.",
ResponseCodeConstants.ERROR_DESC_MAX_OPERATIONS_EXCEEDED,
totalOperationCount,
maxOperationCount));
throw new PayloadTooLargeException(
String.format(ResponseCodeConstants.ERROR_DESC_MAX_OPERATIONS_EXCEEDED,
totalOperationCount,
maxOperationCount));
}

// Get bulk response data.
Expand Down

0 comments on commit f1203ad

Please sign in to comment.