Skip to content

Commit

Permalink
Made setup throw the new 504 if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraLS3 committed Feb 19, 2018
1 parent d1b12c8 commit e7002d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ private void requestSetup(ISender sender, String address) {
sender.sendMessage("§eConnection failed: " + e.getMessage());
} catch (InternalErrorException e) {
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) {
Log.toLog(this.getClass(), e);
sender.sendMessage("§cConnection to Bungee WebServer failed: More info in the error log.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.djrapitops.plan.api.exceptions.connection.BadRequestException;
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.system.info.InfoSystem;
import com.djrapitops.plan.system.info.server.Server;
Expand Down Expand Up @@ -81,7 +82,7 @@ public Response handleRequest(Map<String, String> variables) throws WebException
} catch (ConnectionFailException e) {
Throwable cause = e.getCause();
if (!(cause instanceof SocketException) || !cause.getMessage().contains("Unexpected end of file from server")) {
throw e;
throw new GatewayException(e.getMessage());
}
}

Expand Down

0 comments on commit e7002d7

Please sign in to comment.