Skip to content

Commit

Permalink
Requesting the Calendar for a non-existing study should result in a 4…
Browse files Browse the repository at this point in the history
…04 (not 5xx)
  • Loading branch information
ja-fra committed Jul 4, 2024
1 parent 21b70de commit e0d9099
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public CalendarApiV1Controller(CalendarService calendarService) {

@Override
public ResponseEntity<String> getStudyCalendar(Long studyId) {
return this.calendarService.getICalendarString(studyId)
.map(ResponseEntity::ok)
.orElseThrow(RuntimeException::new);
return ResponseEntity.of(
this.calendarService.getICalendarString(studyId)
);
}
}

0 comments on commit e0d9099

Please sign in to comment.