@@ -205,20 +205,15 @@ public RejectedApplicationListResponse rejectApplicationList(RejectApplicationLi
205205
206206 for (Application application : applications ) {
207207 if (application .getStatus () != PENDING_STATUS ) {
208- failed .add (new FailedApplicationDecisionItemResponse (
209- application .getId (), "Application is not pending" ));
208+ failed .add (
209+ new FailedApplicationDecisionItemResponse ( application .getId (), "Application is not pending" ));
210210 continue ;
211211 }
212- try {
213- Application savedApplication = applicationSaver .saveRejectedApplication (
214- userId , application , request .rejectionReason ());
215- succeeded .add (new SucceededApplicationRejectingItemResponse (
216- savedApplication .getId (), savedApplication .getUserId (), RequestStatus .REJECTED ));
217- } catch (DataIntegrityViolationException e ) {
218- throw new UnexpectedConstraintViolationException (
219- "Unexpected database constraint violation while accepting application" ,
220- ErrorCode .DATA_ACCESS_ERROR , e );
221- }
212+ Application savedApplication = applicationSaver .saveRejectedApplication (
213+ userId , application , request .rejectionReason ());
214+ succeeded .add (
215+ new SucceededApplicationRejectingItemResponse (savedApplication .getId (), userId ,
216+ RequestStatus .REJECTED ));
222217 }
223218 RejectedApplicationListResponse response = RejectedApplicationListResponse .builder ()
224219 .application (new ApplicationDecisionSummary (competitionId , stageId , userId , Instant .now ()))
0 commit comments