Class A2AAgentCardException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.langchain4j.exception.LangChain4jException
dev.langchain4j.agentic.a2a.A2AAgentCardException
- All Implemented Interfaces:
Serializable
Thrown when the agent card of a remote A2A agent cannot be fetched. The card is fetched lazily, the first time
it is needed, which is normally the first invocation of the agent, so this exception reaches the caller of that
invocation and the error handler of the agentic system, where it can be recognized to skip or retry an
unavailable remote agent. A failed fetch is not cached: the next invocation retries it.
- Since:
- 1.24.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionA2AAgentCardException(String agentName, String a2aServerUrl, Throwable cause) -
Method Summary
Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
A2AAgentCardException
-
-
Method Details
-
agentName
- Returns:
- the name of the A2A agent whose card could not be fetched
- Since:
- 1.24.0
-
a2aServerUrl
- Returns:
- the URL of the A2A server the card was requested from, as configured; the message of this exception shows it without user info and query, which may contain credentials
- Since:
- 1.24.0
-