Closed martosaur closed 7 years ago
Oh, shoot! Yes, you're right, there should be a wrapper that catches exceptions in the handler.
But on the other hand, I would advise to only receive updates in the handler and process them also asynchronously with your favorite async model.
For me, this would be putting incoming messages to a channel in a handler and set of workers that take data from that channel and process it.
@Otann thanks for the response! Looks like it's time to get myself familiar with clojure's async tools. ^_^ thanks once again
OK, I'm a complete clojure rookie, but I think this is what's happening: If background process performing long-polling encounters an exception (for example 502 from the api) it shuts down and stops polling updates, which is not nice. An example exception:
If this is intentional, then I'd appreciate any hints on how to tackle this on application level :)