This commit is contained in:
Ske
2020-05-05 19:09:18 +02:00
parent c1d17c2944
commit 892601110f
4 changed files with 21 additions and 4 deletions

View File

@@ -11,6 +11,7 @@ using Autofac;
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.EventArgs;
using DSharpPlus.Exceptions;
using NodaTime;
@@ -122,6 +123,8 @@ namespace PluralKit.Bot
{
// Make this beforehand so we can access the event ID for logging
var sentryEvent = new SentryEvent(exc);
if (exc is BadRequestException bre)
sentryEvent.SetExtra("errors", MiscUtils.ExtractError(bre));
_logger.Error(exc, "Exception in bot event handler (Sentry ID: {SentryEventId})", sentryEvent.EventId);