Erisa / Cliptok

Moderation Discord bot for Microsoft Community.
https://msft.chat/about/bots.html#cliptok
MIT License
63 stars 26 forks source link

Bug: D#+ errors aren't fully logged to DiscordSink #237

Closed Erisa closed 1 month ago

Erisa commented 1 month ago

https://discord.com/channels/150662382874525696/968463420586336286/1301916914402066462

We only get

[2024-11-01 14:28:41 +00:00] [Error] Request to "https://discord.com/api/v10/guilds/150662382874525696/members/933089090365173790" triggered an exception
DSharpPlus.Exceptions.BadRequestException: Bad request: BadRequest
   at DSharpPlus.Net.RestClient.ExecuteRequestAsync[TRequest](TRequest request)

but the Loki sink gets

{"Message":"Request to \"https://discord.com/api/v10/guilds/150662382874525696/members/933089090365173790\" triggered an exception","MessageTemplate":"Request to {url} triggered an exception","Exception":{"Type":"DSharpPlus.Exceptions.BadRequestException","Message":"Bad request: BadRequest","StackTrace":"   at DSharpPlus.Net.RestClient.ExecuteRequestAsync[TRequest](TRequest request)\n   at DSharpPlus.Net.DiscordApiClient.ModifyGuildMemberAsync(UInt64 guildId, UInt64 userId, Optional`1 nick, Optional`1 roleIds, Optional`1 mute, Optional`1 deaf, Optional`1 voiceChannelId, Optional`1 communicationDisabledUntil, String reason)\n   at DSharpPlus.Entities.DiscordMember.ModifyAsync(Action`1 action)\n   at Cliptok.Commands.Dehoist.DehoistCmd(CommandContext ctx, DiscordMember[] discordMembers) in /app/Commands/Dehoist.cs:line 24"},"url":"https://discord.com/api/v10/guilds/150662382874525696/members/933089090365173790","EventId":{"Id":112,"Name":"RestError"},"SourceContext":"DSharpPlus.Net.RestClient","level":"error"}