Class A2ATaskInterruptedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.langchain4j.exception.LangChain4jException
dev.langchain4j.agentic.a2a.A2ATaskInterruptedException
- All Implemented Interfaces:
Serializable
Thrown when an A2A task enters an interrupted state (
input-required or
auth-required) instead of completing.
The remote agent has paused the task and is waiting for additional input or
authentication before it can continue. The A2A server will not advance the task on
its own, so the CompletableFuture backing the invocation
is completed exceptionally with this exception rather than left pending indefinitely.
- Since:
- 1.19.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionA2ATaskInterruptedException(String taskId, org.a2aproject.sdk.spec.TaskState state, String reason) -
Method Summary
Modifier and TypeMethodDescriptionreason()The status message sent by the remote agent when it interrupted the task — typically the question asking for the missing input, or the authentication challenge.org.a2aproject.sdk.spec.TaskStatestate()The interrupted state the task is in, eitherTASK_STATE_INPUT_REQUIREDorTASK_STATE_AUTH_REQUIRED.taskId()The id of the task that was interrupted.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
A2ATaskInterruptedException
-
-
Method Details
-
taskId
-
state
public org.a2aproject.sdk.spec.TaskState state()The interrupted state the task is in, eitherTASK_STATE_INPUT_REQUIREDorTASK_STATE_AUTH_REQUIRED.- Since:
- 1.19.0
-
reason
The status message sent by the remote agent when it interrupted the task — typically the question asking for the missing input, or the authentication challenge. Returnsnullwhen the remote agent interrupted the task without sending one; the generic description used inThrowable.getMessage()in that case is not reported here, so callers can tell the two apart.- Since:
- 1.19.0
-