Capture interaction exceptions in sentry
This commit is contained in:
parent
44ae2eeaf6
commit
01df35b12b
1 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,7 @@ using System.Threading.Tasks;
|
||||||
using Geekbot.Core.Interactions.ApplicationCommand;
|
using Geekbot.Core.Interactions.ApplicationCommand;
|
||||||
using Geekbot.Core.Interactions.Request;
|
using Geekbot.Core.Interactions.Request;
|
||||||
using Geekbot.Core.Interactions.Response;
|
using Geekbot.Core.Interactions.Response;
|
||||||
|
using Sentry;
|
||||||
|
|
||||||
namespace Geekbot.Core.Interactions
|
namespace Geekbot.Core.Interactions
|
||||||
{
|
{
|
||||||
|
@ -20,7 +21,8 @@ namespace Geekbot.Core.Interactions
|
||||||
|
|
||||||
public virtual void OnException(Exception exception)
|
public virtual void OnException(Exception exception)
|
||||||
{
|
{
|
||||||
|
if (!SentrySdk.IsEnabled) return;
|
||||||
|
SentrySdk.CaptureException(exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual InteractionResponse GetExceptionResponse()
|
public virtual InteractionResponse GetExceptionResponse()
|
||||||
|
|
Loading…
Reference in a new issue