Remove special message for error 403

it was a firewall config error at my end after all lol woops
This commit is contained in:
Luck 2020-04-28 21:40:52 +01:00
parent ad6a11819d
commit cd25681cd3
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
5 changed files with 4 additions and 22 deletions

View File

@ -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());
}
return CommandResult.STATE_ERROR;
} catch (IOException e) {
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();

View File

@ -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());
}
return CommandResult.STATE_ERROR;
} catch (IOException e) {
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();

View File

@ -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());
}
return CommandResult.STATE_ERROR;
} catch (IOException e) {
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();

View File

@ -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),

View File

@ -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());
}
return CommandResult.STATE_ERROR;
} catch (IOException e) {
new RuntimeException("Error uploading data to bytebin", e).printStackTrace();