Skip to content

Don't show a scary chat error for non-critical update/MOTD check failures - #38

Open
kovalancik06-max wants to merge 1 commit into
Quantizr:3.xfrom
kovalancik06-max:fix/silence-noncritical-network-errors
Open

Don't show a scary chat error for non-critical update/MOTD check failures#38
kovalancik06-max wants to merge 1 commit into
Quantizr:3.xfrom
kovalancik06-max:fix/silence-noncritical-network-errors

Conversation

@kovalancik06-max

Copy link
Copy Markdown

Summary

  • Fixes Error #31 and Error Check logs #33 (duplicate reports) — players see a red Dungeon Rooms: An error has occured. See logs for more details. chat message on every Hypixel connect.
  • Root cause: the background thread in onServerConnect fetches the latest GitHub release (update check) and a MOTD gist over plain HttpURLConnection. On clients with an outdated bundled Java trust store, this throws SSLHandshakeException: PKIX path building failed (see both issues' attached logs, identical stack trace at DungeonRooms.java:247).
  • That's a non-critical, cosmetic check — it doesn't affect the mod's actual dungeon-solving functionality — but the generic catch block surfaced it as an alarming, unactionable red error every single session.

Fix

  • Replace the chat message + printStackTrace() with a quiet logger.warn(...) call. The failure is still visible in the log file for anyone who wants to investigate, but no longer interrupts/alarms players for something they can't fix and that doesn't matter.

Test plan

  • Confirmed both issues share the exact same stack trace and originating line.
  • Change is a minimal, mechanical replacement of one statement with another using the already-imported Logger field (logger.warn(String, Throwable)), no new imports/behavior elsewhere.
  • Not able to do a full ForgeGradle 1.8.9 build in this environment (requires Java 8 + downloading the full MC/Forge dependency set), so please double check it compiles on your end — the change is intentionally minimal to keep that risk low.

…ures

The update-check and MOTD fetch run in a background thread on every
Hypixel connect and are purely cosmetic. On clients with an outdated
Java trust store this throws SSLHandshakeException, which was caught
and surfaced as a red "An error has occured" chat message every
session (Quantizr#31, Quantizr#33) - alarming for something that isn't actionable by
the player and doesn't affect the mod's actual functionality. Log it
instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error

1 participant