Skip to content

Commit

Permalink
Downgrade log severity for failure to enum. overwrites on Channel Update
Browse files Browse the repository at this point in the history
Also skips removing the event from the list of pending events, so that it is retried on the next task run
  • Loading branch information
FloatingMilkshake committed Aug 21, 2024
1 parent c56a4c3 commit e57145b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tasks/EventTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ await Program.db.HashSetAsync("overrides",
PendingChannelUpdateEvents.Remove(timestamp);
success = true;
}
catch (InvalidOperationException ex)
{
Program.discord.Logger.LogDebug(ex, "Failed to enumerate channel overwrites for channel {channel}; this usually means the permissions were changed while processing a channel event. Will try again on next task run.", e.ChannelAfter.Id);
}
catch (Exception ex)
{
// Log the exception
Expand Down

0 comments on commit e57145b

Please sign in to comment.