Team <#C1CFAFJSK|coroutines>, is jobCencellationEx...
# coroutines
Team #coroutines, is jobCencellationException in flow coroutines is common or how can we avoid this exception
Could you please clarify your problem CancellationException is completely fine by itself, is way to propagate cancellation of coroutines, including Flow
When am leaving viemodel with logout. Am getting jobCencellationException
That’s normal, it’s the mechanism by which coroutines are only active as long as the ViewModel itself is active. You’re not supposed to catch that exception, or if you do you’re supposed to rethrow it to cooperate with cancellation (read more here) Once the ViewModel is cleared, the
will be cancelled so you don’t have work continuing to run the background wasting system resources.