mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Change the API not found error message #3670)
This commit is contained in:
parent
0d25a3f04d
commit
33d50cb668
2 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue