Package com.sap.ai.sdk.orchestration

# Class OrchestrationClientException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.sap.ai.sdk.core.common.ClientException
com.sap.ai.sdk.orchestration.OrchestrationClientException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `OrchestrationFilterException`

public class OrchestrationClientException extends ClientException
Exception thrown by the `OrchestrationClient` in case of an error.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OrchestrationClientException()`
  `OrchestrationClientException(String message)`
  `OrchestrationClientException(String message, Throwable cause)`
  `OrchestrationClientException(Throwable cause)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `OrchestrationError`
  `getClientError()`
  Wraps a structured error payload received from the remote service, if available.
  `ErrorResponse`
  `getErrorResponse()`
  Retrieves the `ErrorResponse` from the orchestration service, if available.
  `ErrorResponseStreaming`
  `getErrorResponseStreaming()`
  Retrieves the `ErrorResponseStreaming` from the orchestration service, if available.
  `Integer`
  `getStatusCode()`
  Retrieves the HTTP status code from the original error response, if available.

  ### Methods inherited from class com.sap.ai.sdk.core.common.ClientException

  `getHttpRequest, getHttpResponse, setClientError, setHttpRequest, setHttpResponse`

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### OrchestrationClientException

    public OrchestrationClientException()

  - ### OrchestrationClientException

    public OrchestrationClientException(String message)

  - ### OrchestrationClientException

    public OrchestrationClientException(Throwable cause)

  - ### OrchestrationClientException

    public OrchestrationClientException(String message, Throwable cause)

- ## Method Details

  - ### getClientError

    @Nullable public OrchestrationError getClientError()
    Description copied from class: `ClientException`
    Wraps a structured error payload received from the remote service, if available. This can be used to extract more detailed error information.
    Overrides:
      `getClientError` in class `ClientException`

  - ### getErrorResponse

    @Beta @Nullable public ErrorResponse getErrorResponse()
    Retrieves the `ErrorResponse` from the orchestration service, if available.
    Returns:
      The `ErrorResponse` object, or `null` if not available.
    Since:
      1.10.0

  - ### getErrorResponseStreaming

    @Beta @Nullable public ErrorResponseStreaming getErrorResponseStreaming()
    Retrieves the `ErrorResponseStreaming` from the orchestration service, if available.
    Returns:
      The `ErrorResponseStreaming` object, or `null` if not available.
    Since:
      1.10.0

  - ### getStatusCode

    @Nullable public Integer getStatusCode()
    Retrieves the HTTP status code from the original error response, if available.
    Returns:
      the HTTP status code, or `null` if not available
    Since:
      1.10.0