Made setup throw the new 504 if needed

This commit is contained in:
Rsl1122 2018-02-19 12:57:05 +02:00
parent d1b12c830c
commit e7002d73f0
2 changed files with 4 additions and 1 deletions

View File

@ -77,6 +77,8 @@ public class ManageSetupCommand extends SubCommand {
sender.sendMessage("§eConnection failed: " + e.getMessage()); sender.sendMessage("§eConnection failed: " + e.getMessage());
} catch (InternalErrorException e) { } catch (InternalErrorException e) {
sender.sendMessage("§eConnection succeeded. " + e.getMessage() + ", check possible ErrorLog on receiving server's debug page."); sender.sendMessage("§eConnection succeeded. " + e.getMessage() + ", check possible ErrorLog on receiving server's debug page.");
} catch (GatewayException e) {
sender.sendMessage("§eConnection succeeded, but Bungee failed to connect to this server. Use Connection debug commands for more.");
} catch (WebException e) { } catch (WebException e) {
Log.toLog(this.getClass(), e); Log.toLog(this.getClass(), e);
sender.sendMessage("§cConnection to Bungee WebServer failed: More info in the error log."); sender.sendMessage("§cConnection to Bungee WebServer failed: More info in the error log.");

View File

@ -6,6 +6,7 @@ package com.djrapitops.plan.system.info.request;
import com.djrapitops.plan.api.exceptions.connection.BadRequestException; import com.djrapitops.plan.api.exceptions.connection.BadRequestException;
import com.djrapitops.plan.api.exceptions.connection.ConnectionFailException; import com.djrapitops.plan.api.exceptions.connection.ConnectionFailException;
import com.djrapitops.plan.api.exceptions.connection.GatewayException;
import com.djrapitops.plan.api.exceptions.connection.WebException; import com.djrapitops.plan.api.exceptions.connection.WebException;
import com.djrapitops.plan.system.info.InfoSystem; import com.djrapitops.plan.system.info.InfoSystem;
import com.djrapitops.plan.system.info.server.Server; import com.djrapitops.plan.system.info.server.Server;
@ -81,7 +82,7 @@ public class SendDBSettingsRequest extends InfoRequestWithVariables implements S
} catch (ConnectionFailException e) { } catch (ConnectionFailException e) {
Throwable cause = e.getCause(); Throwable cause = e.getCause();
if (!(cause instanceof SocketException) || !cause.getMessage().contains("Unexpected end of file from server")) { if (!(cause instanceof SocketException) || !cause.getMessage().contains("Unexpected end of file from server")) {
throw e; throw new GatewayException(e.getMessage());
} }
} }