Previously, errors occurring during the saveAll operation within the reactive save method were swallowed because the inner subscriber did not have an error handler. This caused the Flux to hang indefinitely instead of terminating with an error.
This commit adds an error handler to the inner subscriber that:
1. Cancels the upstream subscription to prevent further processing.
2. Propagates the error to the sink, allowing the caller to receive the error signal.
3. Updates the map operation to return the entity for better debugging capability.
Signed-off-by: Noel F <noel@Noels-MacBook-Pro.local>
* Add test for error propagation in reactive Flux save operations
This test verifies that errors occurring during saveAll operations
with a Flux are properly propagated to the subscriber instead of
being swallowed. The test creates a Flux that emits valid entities
followed by an error, and confirms the error reaches the caller.
Signed-off-by: Noel F <noel@Noels-MacBook-Pro.local>
* undo format fixes
Signed-off-by: Noel F <noel@Noels-MacBook-Pro.local>
* Update error propagation test: expect 0 entities before error due to race condition
The manual subscriber's onError fires before in-flight saveAll can push
results through tryEmitNext, so the caller sees 0 entities before the error.
Updated test expectation and added clarifying comment.
Signed-off-by: Noel F <noel@Noels-MacBook-Pro.local>
---------
Signed-off-by: Noel F <noel@Noels-MacBook-Pro.local>
Co-authored-by: xylos19 <noel@Noels-MacBook-Pro.local>
Closes#3233
Simplify test dependency setup, remove no longer required servlet/xbean dependencies, exclude commons-lang3 in favor of the Testcontainers variant. Remove outdated commons-codec dependency in favor of the Testcontainers variant.
See #3212
The hints for the old httpclient are only needed when the old library is on the classpath, in case a user still uses the old RestClient. For the new Elasticsearch client there are no aot hints required.
Closes: #3203
Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
Jackson2 ist still needed as runtime optional dependency for users that still use the old RestClient.
Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
* Update clients.adoc to show how to log Request/Response for Rest5_Client
Signed-off-by: Steven <steven.pearce@nowyoyo.com>
* Update clients.adoc to use tabs when available
---------
Signed-off-by: Steven <steven.pearce@nowyoyo.com>