From 88f7c511bf9f712cc1249effb28be4561802d78c Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Tue, 6 Feb 2024 22:52:15 +0100 Subject: [PATCH] (#190) Telegram.Client: log errors happened during the message queue processing --- Emulsion.Telegram/Client.fs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Emulsion.Telegram/Client.fs b/Emulsion.Telegram/Client.fs index 459874d8..73e6ccae 100644 --- a/Emulsion.Telegram/Client.fs +++ b/Emulsion.Telegram/Client.fs @@ -22,7 +22,11 @@ type Client(ctx: ServiceContext, hostingSettings: HostingSettings option) = inherit MessageSystemBase(ctx, cancellationToken) - let botConfig = { Funogram.Telegram.Bot.Config.defaultConfig with Token = telegramSettings.Token } + let botConfig = { + Funogram.Telegram.Bot.Config.defaultConfig with + Token = telegramSettings.Token + OnError = fun e -> ctx.Logger.Error(e, "Exception in Telegram message processing") + } interface ITelegramClient with member this.GetFileInfo(fileId) = async {