# Error handling with @Transactional

DevFeed: [Error handling with @Transactional](<https://devfeed.tech/articles/error-handling-with-transactional-27318.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201911/transactional-errors/>)

Published: 2019-11-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Spring Framework](<https://devfeed.tech/topics/spring-framework.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [exception](<https://devfeed.tech/tags/exception.md>), [spring](<https://devfeed.tech/tags/spring.md>), [spring-framework](<https://devfeed.tech/tags/spring-framework.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

## AI overview

This article explains Spring transaction rollback behavior for runtime and checked exceptions, including how explicit rollback configuration affects checked exceptions. It also discusses how Lombok's @SneakyThrows interacts with @Transactional.

## Source excerpt

You probably already know that by default in spring transactions are rolled back only for runtime exceptions. When a checked exception is thrown from your code and you don't explicitly tell spring that it should rollback the transaction then it get's committed. In this post, I'm going to create simple reference material on when transactions are rollback when using Spring and Lombok. Read more