Fix logging error handling to include exception details for invalid webhook URLs

This commit is contained in:
Slipstream 2025-06-05 15:08:19 -06:00
parent b164c8856e
commit 7c1b39a9ac
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -184,8 +184,8 @@ class LoggingCog(commands.Cog):
avatar_url=self.bot.user.display_avatar.url,
)
# log.debug(f"Sent log embed via webhook for guild {guild.id}") # Can be noisy
except ValueError:
log.error(f"Invalid logging webhook URL configured for guild {guild.id}.")
except ValueError as e:
log.exception(f"Invalid logging webhook URL configured for guild {guild.id}. Error: {e}")
# Consider notifying an admin or disabling logging for this guild temporarily
# await settings_manager.set_logging_webhook(guild.id, None) # Example: Auto-disable on invalid URL
except (discord.Forbidden, discord.NotFound):