Skip to content

Commit

Permalink
📝 :: exception fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lgwk42 committed Oct 29, 2024
1 parent 50ab7e5 commit 49c275e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import org.webjars.NotFoundException;

@Service
@RequiredArgsConstructor
Expand Down Expand Up @@ -46,7 +47,7 @@ public List<Long> getRoomIdList(PageRequest request) {
.toUri();
ResponseEntity<RoomIdsResponse> responseEntity = restTemplate.getForEntity(uri, RoomIdsResponse.class);
if (responseEntity.getBody() == null || responseEntity.getBody().getRoomIds() == null) {
throw new NullPointerException("응답값을 찾을 수 없습니다.");
throw new NotFoundException("응답값을 찾을 수 없습니다.");
}
List<Long> roomIds = responseEntity.getBody().getRoomIds();
return roomIds;
Expand Down

0 comments on commit 49c275e

Please sign in to comment.