mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 03:25:19 +01:00
Remove special message for error 403
it was a firewall config error at my end after all lol woops
This commit is contained in:
parent
ad6a11819d
commit
cd25681cd3
@ -85,11 +85,7 @@ public class ApplyEditsCommand extends SingleCommand {
|
||||
try {
|
||||
data = WebEditor.readDataFromBytebin(plugin.getBytebin(), code);
|
||||
} catch (UnsuccessfulRequestException e) {
|
||||
if (e.getResponse().code() == 403) {
|
||||
Message.EDITOR_HTTP_FORBIDDEN_FAILURE.send(sender);
|
||||
} else {
|
||||
Message.EDITOR_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||
}
|
||||
Message.EDITOR_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||
return CommandResult.STATE_ERROR;
|
||||
} catch (IOException e) {
|
||||
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
||||
|
@ -98,11 +98,7 @@ public class TreeCommand extends SingleCommand {
|
||||
try {
|
||||
id = view.uploadPasteData(plugin.getBytebin(), sender, user, permissionData);
|
||||
} catch (UnsuccessfulRequestException e) {
|
||||
if (e.getResponse().code() == 403) {
|
||||
Message.GENERIC_HTTP_FORBIDDEN_FAILURE.send(sender);
|
||||
} else {
|
||||
Message.GENERIC_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||
}
|
||||
Message.GENERIC_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||
return CommandResult.STATE_ERROR;
|
||||
} catch (IOException e) {
|
||||
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
||||
|
@ -119,11 +119,7 @@ public class VerboseCommand extends SingleCommand {
|
||||
try {
|
||||
id = listener.uploadPasteData(plugin.getBytebin());
|
||||
} catch (UnsuccessfulRequestException e) {
|
||||
if (e.getResponse().code() == 403) {
|
||||
Message.GENERIC_HTTP_FORBIDDEN_FAILURE.send(sender);
|
||||
} else {
|
||||
Message.GENERIC_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||
}
|
||||
Message.GENERIC_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||
return CommandResult.STATE_ERROR;
|
||||
} catch (IOException e) {
|
||||
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
||||
|
@ -143,7 +143,6 @@ public enum Message {
|
||||
TREE_URL("&aPermission tree URL:", true),
|
||||
|
||||
GENERIC_HTTP_REQUEST_FAILURE("&cUnable to communicate with the web app. (response code &4{}&c, message='{}')", true),
|
||||
GENERIC_HTTP_FORBIDDEN_FAILURE("&cUnable to communicate with the web app - '&4forbidden access&c' error &4403&3. You network provider or firewall (antivirus / content filter?) may have blocked access to the resource.", true),
|
||||
GENERIC_HTTP_UNKNOWN_FAILURE("&cUnable to communicate with the web app. Check the console for errors.", true),
|
||||
|
||||
SEARCH_SEARCHING("&aSearching for users and groups with &bpermissions {}&a...", true),
|
||||
@ -170,7 +169,6 @@ public enum Message {
|
||||
EDITOR_URL("&aClick the link below to open the editor:", true),
|
||||
|
||||
EDITOR_HTTP_REQUEST_FAILURE("&cUnable to communicate with the editor. (response code &4{}&c, message='{}')", true),
|
||||
EDITOR_HTTP_FORBIDDEN_FAILURE("&cUnable to communicate with the editor - '&4forbidden access&c' error &4403&3. You network provider or firewall (antivirus / content filter?) may have blocked access to the resource.", true),
|
||||
EDITOR_HTTP_UNKNOWN_FAILURE("&cUnable to communicate with the editor. Check the console for errors.", true),
|
||||
|
||||
CHECK_RESULT("&aPermission check result on user &b{}&a for permission &b{}&a: &f{}", true),
|
||||
|
@ -137,11 +137,7 @@ public final class WebEditor {
|
||||
try {
|
||||
pasteId = plugin.getBytebin().postContent(bytesOut.toByteArray(), AbstractHttpClient.JSON_TYPE, false).key();
|
||||
} catch (UnsuccessfulRequestException e) {
|
||||
if (e.getResponse().code() == 403) {
|
||||
Message.EDITOR_HTTP_FORBIDDEN_FAILURE.send(sender);
|
||||
} else {
|
||||
Message.EDITOR_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||
}
|
||||
Message.EDITOR_HTTP_REQUEST_FAILURE.send(sender, e.getResponse().code(), e.getResponse().message());
|
||||
return CommandResult.STATE_ERROR;
|
||||
} catch (IOException e) {
|
||||
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();
|
||||
|
Loading…
Reference in New Issue
Block a user