3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-25 15:50:14 +01:00

Change the API not found error message #3670)

Dieser Commit ist enthalten in:
onebeastchris 2023-05-07 09:07:27 +02:00 committet von GitHub
Ursprung 0d25a3f04d
Commit 33d50cb668
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 7 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -46,9 +46,8 @@ public final class Constants {
try {
wsUri = new URI("wss://api.geysermc.org/ws");
} catch (URISyntaxException e) {
GeyserImpl.getInstance().getLogger().error("Unable to resolve api.geysermc.org! Check your internet connection.");
e.printStackTrace();
}
GLOBAL_API_WS_URI = wsUri;
}
}
}

Datei anzeigen

@ -44,6 +44,7 @@ import org.java_websocket.handshake.ServerHandshake;
import javax.net.ssl.SSLException;
import java.net.ConnectException;
import java.net.UnknownHostException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Iterator;
@ -175,6 +176,10 @@ public final class FloodgateSkinUploader {
@Override
public void onError(Exception ex) {
if (ex instanceof UnknownHostException) {
logger.error("Unable to resolve the skin api! This can be caused by your connection or the skin api being unreachable. " + ex.getMessage());
return;
}
if (ex instanceof ConnectException || ex instanceof SSLException) {
if (logger.isDebug()) {
logger.error("[debug] Got an error", ex);
@ -237,4 +242,4 @@ public final class FloodgateSkinUploader {
client.close();
}
}
}
}