Package com.sap.ai.sdk.orchestration

# Class OrchestrationFilterException

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
com.sap.ai.sdk.orchestration.OrchestrationFilterException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `OrchestrationFilterException.Input`, `OrchestrationFilterException.Output`

@Beta public class OrchestrationFilterException extends OrchestrationClientException
Base exception for errors occurring during orchestration filtering.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `OrchestrationFilterException.Input`
  Exception thrown when an error occurs during input filtering.
  `static class`
  `OrchestrationFilterException.Output`
  Exception thrown when an error occurs during output filtering, specifically when the finish reason is a content filter.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Map<String,Object>`
  `filterDetails`
  Details about the filters that caused the exception.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map<String,Object>`
  `getFilterDetails()`
  Details about the filters that caused the exception.
  `LlamaGuard38b`
  `getLlamaGuard38b()`
  Retrieves LlamaGuard 3.8b details from `filterDetails`, if present.

  ### Methods inherited from class com.sap.ai.sdk.orchestration.OrchestrationClientException

  `getClientError, getErrorResponse, getErrorResponseStreaming, getStatusCode`

  ### 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`

- ## Field Details

  - ### filterDetails

    @Nonnull protected Map<String,Object> filterDetails
    Details about the filters that caused the exception.

- ## Method Details

  - ### getLlamaGuard38b

    @Nullable public LlamaGuard38b getLlamaGuard38b()
    Retrieves LlamaGuard 3.8b details from `filterDetails`, if present.
    Returns:
      The LlamaGuard38b object, or `null` if not found or conversion fails.
    Throws:
      `IllegalArgumentException` - if the conversion of filter details to `LlamaGuard38b` fails due to invalid content.

  - ### getFilterDetails

    @Nonnull public Map<String,Object> getFilterDetails()
    Details about the filters that caused the exception.