diff options
author | nea <nea@nea.moe> | 2023-08-31 18:19:06 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-08-31 18:19:06 +0200 |
commit | b7b01f1c6fbf889ae9bfcdb5b34c5ccfa48d5ba0 (patch) | |
tree | 535b601405763736109be9ff281a71c06155b52f /src/main/kotlin/moe/nea/firmament/apis/UrsaManager.kt | |
parent | ba72aedf7fb98c1ec72a8745402f577fb0024508 (diff) | |
download | Firmament-b7b01f1c6fbf889ae9bfcdb5b34c5ccfa48d5ba0.tar.gz Firmament-b7b01f1c6fbf889ae9bfcdb5b34c5ccfa48d5ba0.tar.bz2 Firmament-b7b01f1c6fbf889ae9bfcdb5b34c5ccfa48d5ba0.zip |
Fix profile viewer for missing uuid pets
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/apis/UrsaManager.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/apis/UrsaManager.kt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/apis/UrsaManager.kt b/src/main/kotlin/moe/nea/firmament/apis/UrsaManager.kt index a72d633..8288283 100644 --- a/src/main/kotlin/moe/nea/firmament/apis/UrsaManager.kt +++ b/src/main/kotlin/moe/nea/firmament/apis/UrsaManager.kt @@ -9,14 +9,14 @@ package moe.nea.firmament.apis import io.ktor.client.request.* import io.ktor.client.statement.* import io.ktor.http.* -import java.time.Duration -import java.time.Instant -import java.util.* import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.withContext -import net.minecraft.client.MinecraftClient import moe.nea.firmament.Firmament +import net.minecraft.client.MinecraftClient +import java.time.Duration +import java.time.Instant +import java.util.* object UrsaManager { private data class Token( @@ -64,6 +64,9 @@ object UrsaManager { ?: (Instant.now() + Duration.ofMinutes(55)) currentToken = Token(validUntil, savedToken, host) } + if (response.status.value != 200) { + Firmament.logger.error("Failed to contact ursa minor: ${response.bodyAsText()}") + } return response } finally { if (didLock) |