diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-10-05 11:27:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-05 11:27:30 +0200 |
commit | 1c9fd3f55529461e32a341a71318b9b4664ef816 (patch) | |
tree | 8518ee0f1359c327aae9e8f90887e61b5ff20c8f /src/main/java/at/hannibal2/skyhanni/features/mining | |
parent | b755ffe1a288282f9b29bf7b6c048d5e94c48e37 (diff) | |
download | skyhanni-1c9fd3f55529461e32a341a71318b9b4664ef816.tar.gz skyhanni-1c9fd3f55529461e32a341a71318b9b4664ef816.tar.bz2 skyhanni-1c9fd3f55529461e32a341a71318b9b4664ef816.zip |
Improvement: Mining Event Error Format (#2671)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/mining')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt index a076ba68f..d5ee14ec9 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/mining/eventtracker/MiningEventTracker.kt @@ -200,7 +200,8 @@ object MiningEventTracker { canRequestAt = SimpleTimeMark.now() + 20.minutes if (LorenzUtils.debug) { ErrorManager.logErrorWithData( - e, "Receiving mining event data was unsuccessful", + e, + "Failed to load Mining Event data!", ) } return@launch @@ -208,11 +209,17 @@ object MiningEventTracker { val miningEventData = ConfigManager.gson.fromJson(data, MiningEventDataReceive::class.java) if (!miningEventData.success) { - ErrorManager.logErrorWithData( - Exception("PostFailure"), "Receiving mining event data was unsuccessful", - "cause" to miningEventData.cause, - "recievedData" to data - ) + if (data.toString() == "{}") { + ChatUtils.chat("§cFailed loading Mining Event data!\n" + + "Please wait until the server problem fixes itself! There is nothing else to do at the moment.") + } else { + ErrorManager.logErrorWithData( + Exception("miningEventData.success = false"), + "Failed to load Mining Event data!", + "cause" to miningEventData.cause, + "recievedData" to data + ) + } return@launch } apiErrorCount = 0 |