CompletionException
The unchecked exception CompletableFuture.join throws when the future failed, wrapping the real cause.
In more detail
Unwrap it with getCause at the boundary that translates failures into responses. get throws the checked ExecutionException for the same situation.
Related terms
- CompletableFuture — A Future that can be completed later and chained, letting you describe asynchronous steps such as transform, combine and recover without nesting callbacks.
- exception chaining — Linking a new exception to the one that caused it, so the higher-level failure still carries the original error and its stack trace.
Taught in
- Async With CompletableFuture — Modern Java: Virtual Threads & High-Throughput Services