diff --git a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs index 787b0a8e9f..67f740defd 100644 --- a/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs +++ b/src/Tgstation.Server.Host/Components/Chat/Providers/DiscordProvider.cs @@ -261,10 +261,20 @@ namespace Tgstation.Server.Host.Components.Chat.Providers ct: cancellationToken); if (!result.IsSuccess) + { Logger.LogWarning( "Failed to send to channel {channelId}: {result}", channelId, result.LogFormat()); + + if (result.Error is RestResultError restError && restError.Error.Code == DiscordError.InvalidFormBody) + await channelsClient.CreateMessageAsync( + channelId, + "TGS: Could not send message to Discord. Body was malformed or too long", + messageReference: replyToReference, + allowedMentions: allowedMentions, + ct: cancellationToken); + } } try