OnErrorContinue throws already handled Exceptions
See original GitHub issueI am using reactor with MongoDB and when saving to Mongo I get the following exception when using OnErrorContinue
org.springframework.transaction.reactive.TransactionContextManager$NoTransactionInContextException: No transaction in context
However, the data has been saved correctly in MongoDB. It seems that already handled Exceptions are still being catch by onErrorContinue.
I found the following link describing that behaviour. https://github.com/spring-projects/spring-data-r2dbc/issues/211
My question is, what is the semactic of onErrorContinue? Should it received already handled exceptions? Is it a bug? I could not find any description of onErrorContinue on the documentation.
Expected Behavior
Already handled Exception should not be handled by onErrorContinue
Actual Behavior
Actually onErrorContinue is getting already handled Exceptions.
Steps to Reproduce
mongoRepository
.save(data)
.onErrorContinue { e, _ -> logger.warn("Error saving data to repository: $e") }
Then code above prints the following error: org.springframework.transaction.reactive.TransactionContextManager$NoTransactionInContextException: No transaction in context
Although, the data is being saved in MongoDB.
Possible Solution
Your Environment
- Reactor version(s) used: reactor-core 3.3.2
- Other relevant libraries versions (eg.
netty, …): - JVM version (
javar -version): 1.8 - OS and version (eg
uname -a): Linux Ubuntu 18
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Related StackOverflow Question
I’m having same issue here
NoTransactionInContextException isn’t an error, it’s the signal Spring’s transaction infrastructure uses to signal that no transaction is in progress.