augustjune on master
Update log4cats-core, log4cats-… (compare)
augustjune on v0.6.0
augustjune on github-actions-release
augustjune on bump-cats-core-laws-version
augustjune on sbt-github-actions
augustjune on dependencies-update
augustjune on master
Updated code examples (#380) (compare)
augustjune on dependencies-update
removed sbt assembly dependency updated examples (compare)
import canoe.api._
import canoe.api.models.Keyboard
import canoe.models.{CallbackButtonSelected, InlineKeyboardButton, InlineKeyboardMarkup, Update}
import canoe.syntax._
import cats.Monad
import cats.effect.concurrent.Ref
import cats.effect.{Concurrent, ExitCode, IO, IOApp}
import cats.implicits._
import fs2.{Pipe, Stream}
0.5.0
?
Scenario
though
InlineKeyboardButton
constructor methods don't expose this param, my bad
InlineKeyboardButton
companion object with some description
Hi @augustjune and thanks for the library :)
a quick question: i'm developing a bot with different scenarios and callbacks and was wondering if there are any way to have a "global exception handler" instead of use .attempt
or .handleErrorWith
for each of the scenarios.
i was expecting the app not to crash if something fails during the evaluation of one of the scenarios (because of a bad input, some unhandled edge case, temporary connection error with external sources, telegram server not responding ..).
i'have tried to use the handleErrorWith/attempt in the main stream:
telegramClient
.flatMap(implicit client =>
Bot
.polling[IO]
.follow(scen1,scen2,scen3)
.through(callback1)
//tried here
)
//tried here
.compile
.drain
.as(ExitCode.Success)
but the underlying stream seems to explode:
[ioapp-compute-3] INFO o.h.c.PoolManager - Shutting down connection pool: curAllocated=1 idleQueues.size=1 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
Non-daemon threads currently preventing JVM termination: - 29: Thread[pool-1-thread-1,5,main]
- - 44: Thread[DestroyJavaVM,5,main]
Am i missing something?
.tolerate
and .cancel
methods that you can use to steer the flow