java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.mule.runtime.api.exception.MuleRuntimeException
org.mule.runtime.extension.api.exception.ModuleException
com.mulesoft.connectors.a2a.internal.error.exception.ClientException
All Implemented Interfaces:
Serializable, org.mule.runtime.api.exception.ErrorMessageAwareException

public class ClientException extends org.mule.runtime.extension.api.exception.ModuleException implements org.mule.runtime.api.exception.ErrorMessageAwareException
Exception that carries the complete response details (body and attributes) when A2A client operations fail. Implements ErrorMessageAwareException to provide structured access to error response via error.errorMessage.
See Also:
  • Constructor Details

  • Method Details

    • getResponseBody

      public String getResponseBody()
      Provides access to the response body as a String.
      Returns:
      String containing the response body
    • getResponseAttributes

      public ResponseAttributes getResponseAttributes()
      Provides access to the response attributes (status code, headers, etc.)
      Returns:
      ResponseAttributes object with HTTP response details
    • getErrorMessage

      public org.mule.runtime.api.message.Message getErrorMessage()
      Implementation of ErrorMessageAwareException - provides structured access to error response. Users can access: error.errorMessage.payload (response body) and error.errorMessage.attributes (response attributes)
      Specified by:
      getErrorMessage in interface org.mule.runtime.api.exception.ErrorMessageAwareException
      Returns:
      Message containing response body as payload and attributes