# From RxJava to Kotlin Flow: Error Handling

DevFeed: [From RxJava to Kotlin Flow: Error Handling](<https://devfeed.tech/articles/from-rxjava-to-kotlin-flow-error-handling-38628.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2020_02_24_from_rxjava_to_kotlin_flow_error_handling/>)

Published: 2020-02-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [kotlin-flow](<https://devfeed.tech/topics/kotlin-flow.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [coroutine](<https://devfeed.tech/tags/coroutine.md>), [crashes](<https://devfeed.tech/tags/crashes.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [exception](<https://devfeed.tech/tags/exception.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-flow](<https://devfeed.tech/tags/kotlin-flow.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

## AI overview

This tutorial compares error handling in RxJava and Kotlin Flow. It explains that RxJava propagates stream errors as terminal events to an Observer's onError callback, while Kotlin Flow uses coroutine exception handling, including try-catch and propagation to parent jobs or coroutine scopes.

## Source excerpt

Source This post is part of series of comparing RxJava to Kotlin Flow. Previous articles were about Threading and Backpressure. Introduction Error handling is fundamental in reactive programming. Reactive streams might fail with exception and propagate it as an event downstream notifying consumers on the error that happened. As in previous articles, we'll try to compare RxJava and Kotlin Flow error handling mechanisms. This might help us to migrate existing code from RxJava to Kotlin Flow and also understand how to properly use Kotlin Flow.