Skip to content

Commit 201b18e

Browse files
committed
fix: enhance error logging for webhook client creation failures
1 parent 89c46fc commit 201b18e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/main/java/net/onelitefeather/antiredstoneclockremastered/service/impl/DiscordNotificationService.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,14 @@ private WebhookClient createWebHook() {
4848
try {
4949
URI.create(this.plugin.getConfig().getString("notification.discord.webhook", ""));
5050
} catch (IllegalArgumentException e) {
51-
LOGGER.error("Failed to create webhook client. Please check your webhook URL in the config.yml");
52-
LOGGER.error("Disabling plugin...");
51+
LOGGER.error("Failed to create webhook client. Please check your webhook URL in the config.yml", e);
5352
Bukkit.getPluginManager().disablePlugin(this.plugin);
5453
return null;
5554
}
5655
try {
5756
return WebhookClient.withUrl(this.plugin.getConfig().getString("notification.discord.webhook", ""));
5857
} catch (IllegalArgumentException e) {
59-
LOGGER.error("Failed to create webhook client. Please check your webhook URL in the config.yml");
60-
LOGGER.error("Disabling plugin...");
58+
LOGGER.error("Failed to create webhook client. Please check your webhook URL in the config.yml", e);
6159
Bukkit.getPluginManager().disablePlugin(this.plugin);
6260
return null;
6361
}

0 commit comments

Comments
 (0)