aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2024-10-06 16:30:33 +0200
committerGitHub <noreply@github.com>2024-10-06 16:30:33 +0200
commitcbaae605593df9ce1edf1675f0ef6d4e560fc6ff (patch)
tree5c5f44ae5d39496b0fd3c43f84e334fca72b8ef9 /src/main/java/at/hannibal2/skyhanni/data
parent1e786d98c20a022e2c11c11a2cd55cc4efd6a499 (diff)
downloadskyhanni-cbaae605593df9ce1edf1675f0ef6d4e560fc6ff.tar.gz
skyhanni-cbaae605593df9ce1edf1675f0ef6d4e560fc6ff.tar.bz2
skyhanni-cbaae605593df9ce1edf1675f0ef6d4e560fc6ff.zip
Improvement: Better bz errors (#2681)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt
index c1a7af289..7a97fca1d 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/bazaar/HypixelBazaarFetcher.kt
@@ -37,7 +37,7 @@ object HypixelBazaarFetcher {
@SubscribeEvent
fun onDebugDataCollect(event: DebugDataCollectEvent) {
- event.title("Bazaar Fetching")
+ event.title("Bazaar Data Fetcher from API")
val data = listOf(
"failedAttempts: $failedAttempts",
@@ -119,13 +119,20 @@ object HypixelBazaarFetcher {
e.printStackTrace()
} else {
nextFetchTime = SimpleTimeMark.now() + 15.minutes
- ErrorManager.logErrorWithData(
- e,
- userMessage,
- "fetchType" to fetchType,
- "failedAttempts" to failedAttempts,
- "rawResponse" to rawResponse,
- )
+ if (rawResponse == null || rawResponse.toString() == "{}") {
+ ChatUtils.chat(
+ "§cFailed loading Bazaar Price data!\n" +
+ "Please wait until the Hypixel API is sending correct data again! There is nothing else to do at the moment.",
+ )
+ } else {
+ ErrorManager.logErrorWithData(
+ e,
+ userMessage,
+ "fetchType" to fetchType,
+ "failedAttempts" to failedAttempts,
+ "rawResponse" to rawResponse,
+ )
+ }
}
}