Skip to content

Commit

Permalink
feature: PR 리뷰 수정사항 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
ss0ngcode committed Aug 19, 2024
1 parent f8a44c2 commit 49023c8
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public ResponseEntity<?> getTimetable(
try {
response = ResponseEntity.ok(
timetableService.getTimetable(stationId, dayTypeCode, updownCode, time));
} catch (StationNotFoundException | InvalidTypeException | DateTimeParseException exception) {
} catch (DateTimeParseException exception) {
response = ResponseEntity.badRequest().body("해당 시간 형식은 올바르지 않습니다.");
} catch (StationNotFoundException | InvalidTypeException exception) {
response = ResponseEntity.badRequest().body(exception.getMessage());
} catch (TimetableNotFoundException exception) {
response = ResponseEntity.status(HttpStatus.NOT_FOUND).body(exception.getMessage());
Expand All @@ -56,7 +58,9 @@ public ResponseEntity<?> getTimetableList(
try {
response = ResponseEntity.ok(
timetableService.getTimetableList(stationId, dayTypeCode, updownCode, startTime, endTime));
} catch (StationNotFoundException | InvalidTypeException | DateTimeParseException exception) {
} catch (DateTimeParseException exception) {
response = ResponseEntity.badRequest().body("해당 시간 형식은 올바르지 않습니다.");
} catch (StationNotFoundException | InvalidTypeException exception) {
response = ResponseEntity.badRequest().body(exception.getMessage());
}
return response;
Expand Down

0 comments on commit 49023c8

Please sign in to comment.