Class AsyncNotSupportedException
- All Implemented Interfaces:
Serializable
*Async method, or a reactive Publisher-returning
method) is not implemented by a component, and is therefore the internal "this component is not genuinely
asynchronous" marker carried by those methods' default implementations. The default methods deliver it
through their return type — a failed CompletableFuture or a failing
Flow.Publisher — rather than throwing it synchronously.
It is a dedicated framework exception so that the asynchronous/reactive orchestrators (for example the RAG
pipeline and the tool loop) can match this specific type to decide whether to offload the blocking
counterpart or fail loudly — without mistaking an incidental UnsupportedOperationException
thrown from deep inside a genuinely asynchronous component (e.g. List.of(...).add(x), or an unsupported
store filter) for a "not async" signal.
It is an UnsupportedFeatureException - "this component does not support being called asynchronously" -
and therefore also a NonRetriableException: a method that does not implement its asynchronous counterpart
will not begin to implement it on a retry, so retrying (with back-off) would only waste time before failing.
Catching UnsupportedFeatureException catches this too.
- Since:
- 1.20.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AsyncNotSupportedException
-