forked from MinecraftUtilities/Backend
fix WebRequest (again)
This commit is contained in:
parent
57601acbb1
commit
852f5a8bea
@ -35,6 +35,7 @@ public class WebRequest {
|
|||||||
ResponseEntity<T> profile = CLIENT.get()
|
ResponseEntity<T> profile = CLIENT.get()
|
||||||
.uri(url)
|
.uri(url)
|
||||||
.retrieve()
|
.retrieve()
|
||||||
|
.onStatus(HttpStatusCode::isError, (request, response) -> {}) // Don't throw exceptions on error
|
||||||
.toEntity(clazz);
|
.toEntity(clazz);
|
||||||
|
|
||||||
if (profile.getStatusCode().isError()) {
|
if (profile.getStatusCode().isError()) {
|
||||||
|
@ -4,7 +4,7 @@ import cc.fascinated.model.cache.CachedEndpointStatus;
|
|||||||
import org.springframework.data.repository.CrudRepository;
|
import org.springframework.data.repository.CrudRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A cache repository for the Mojang endpoint status.
|
* A cache repository for {@link CachedEndpointStatus}'s.
|
||||||
*
|
*
|
||||||
* @author Braydon
|
* @author Braydon
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user