Class A2AAgentCardException

All Implemented Interfaces:
Serializable

public class A2AAgentCardException extends AgentUnavailableException
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, by this type or by its supertype AgentUnavailableException, common to every integration. A fetch that does not complete within the resolution timeout of the agent, 30 seconds by default, is interrupted and reported with this exception too, with a TimeoutException as cause. As long as a fetch that timed out has not reacted to its interruption, the card cannot be fetched again: the invocations arriving in the meantime fail at once, with a message saying that the previous fetch is still running. Concurrent first invocations wait on the same fetch and all fail when it fails, each with its own exception sharing that cause, but 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

    • 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