From 852f5a8beafc29858288914a76aff4448c78a25b Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 13 Apr 2024 15:42:30 +0100 Subject: [PATCH] fix WebRequest (again) --- src/main/java/cc/fascinated/common/WebRequest.java | 1 + .../java/cc/fascinated/repository/EndpointStatusRepository.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/cc/fascinated/common/WebRequest.java b/src/main/java/cc/fascinated/common/WebRequest.java index 2dc5aaa..c6bd3fd 100644 --- a/src/main/java/cc/fascinated/common/WebRequest.java +++ b/src/main/java/cc/fascinated/common/WebRequest.java @@ -35,6 +35,7 @@ public class WebRequest { ResponseEntity profile = CLIENT.get() .uri(url) .retrieve() + .onStatus(HttpStatusCode::isError, (request, response) -> {}) // Don't throw exceptions on error .toEntity(clazz); if (profile.getStatusCode().isError()) { diff --git a/src/main/java/cc/fascinated/repository/EndpointStatusRepository.java b/src/main/java/cc/fascinated/repository/EndpointStatusRepository.java index 49e8a3b..b84bca2 100644 --- a/src/main/java/cc/fascinated/repository/EndpointStatusRepository.java +++ b/src/main/java/cc/fascinated/repository/EndpointStatusRepository.java @@ -4,7 +4,7 @@ import cc.fascinated.model.cache.CachedEndpointStatus; import org.springframework.data.repository.CrudRepository; /** - * A cache repository for the Mojang endpoint status. + * A cache repository for {@link CachedEndpointStatus}'s. * * @author Braydon */