From 471c3e6e80729cd1034a149023a96ec051b9064e Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 13 Apr 2024 15:36:20 +0100 Subject: [PATCH] fix bug with calling apis --- src/main/java/cc/fascinated/common/WebRequest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/cc/fascinated/common/WebRequest.java b/src/main/java/cc/fascinated/common/WebRequest.java index e524a72..695b5bc 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()) {