# Error handling in Kafka stream

**URL:** https://forum.confluent.io/t/error-handling-in-kafka-stream/7371
**Category:** Kafka Streams
**Created:** [8 March 2023 05:08 UTC](https://forum.confluent.io/t/error-handling-in-kafka-stream/7371 "2023-03-08T05:08:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Itsbikram](https://avatars.discourse-cdn.com/v4/letter/i/c68b51/32.png) [@Itsbikram](https://forum.confluent.io/u/Itsbikram)
#### Post date: [8 March 2023 05:08 UTC](https://forum.confluent.io/t/error-handling-in-kafka-stream/7371/1 "2023-03-08T05:08:59Z")

</div>

I have multiple globalktable join with corresponding transformer using DSL in our Kafka stream.  
If there is any exception in the transformer, i want to commit the Kafka offset and sent to a dead letter queue.  
Instead of writing try catch in my transformer code , is there any other way of solving it?

---

<div class="post-metadata">

### Author: ![bbejeck](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/bbejeck/32/412_2.png) [@bbejeck](https://forum.confluent.io/u/bbejeck)
#### Post date: [8 March 2023 14:02 UTC](https://forum.confluent.io/t/error-handling-in-kafka-stream/7371/2 "2023-03-08T14:02:54Z")

</div>

Hi @Itsbikram ,

What you have described, using a `try...catch` block in the transformer, is the best way to achieve what you want in the case of an error.

The only internal error handling Kafka Streams offers is the `DeserializationExceptionHandler` for dealing with deserialization errors when consuming from a topic.
