Class A2AAgentCardException

All Implemented Interfaces:
Serializable

public class A2AAgentCardException extends LangChain4jException
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 Details

    • A2AAgentCardException

      public A2AAgentCardException(String agentName, String a2aServerUrl, Throwable cause)
  • Method Details

    • agentName

      public String agentName()
      Returns:
      the name of the A2A agent whose card could not be fetched
      Since:
      1.24.0
    • a2aServerUrl

      public String 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