Skip to content

Commit

Permalink
Added different status in case of conditions failed
Browse files Browse the repository at this point in the history
  • Loading branch information
saipradeep_ravipati committed Nov 6, 2023
1 parent c28b50f commit 5c0b506
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public Response adminEnrolBPWorkFlow(String rootOrg, String org, WfRequest wfReq
if (!enrollmentStatus.isEmpty()) {
response = new Response();
response.put(Constants.MESSAGE, "User previously existed, was removed, or was declined by an administrator within this batch.");
response.put(Constants.STATUS, HttpStatus.OK);
response.put(Constants.STATUS, HttpStatus.PRECONDITION_FAILED);
} else {
response = saveAdminEnrollUserIntoWfStatus(rootOrg, org, wfRequest);
// producer.push(configuration.getWorkFlowNotificationTopic(), wfRequest);
Expand All @@ -512,7 +512,7 @@ public Response adminEnrolBPWorkFlow(String rootOrg, String org, WfRequest wfReq
} else {
response = new Response();
response.put(Constants.MESSAGE, "Not allowed to enroll the user to the Blended Program since there is a schedule conflict");
response.put(Constants.STATUS, HttpStatus.NOT_ACCEPTABLE);
response.put(Constants.STATUS, HttpStatus.PRECONDITION_FAILED);
}
return response;
}
Expand Down

0 comments on commit 5c0b506

Please sign in to comment.