Skip to content

Commit

Permalink
(#190) Telegram.Client: log errors happened during the message queue …
Browse files Browse the repository at this point in the history
…processing
  • Loading branch information
ForNeVeR committed Feb 6, 2024
1 parent 4115644 commit 88f7c51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Emulsion.Telegram/Client.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 88f7c51

Please sign in to comment.