Skip to main content

io.enterpriseai.errors.ApprovalRequiredException

Source: sdks/java/enterprise-ai-java/src/main/java/io/enterpriseai/errors/ApprovalRequiredException.java. Back to the Java SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class ApprovalRequiredException​

Raised when the action needs a human approval first; #approvalId() gives the pending approval when returned.

EaiException

Constructor ApprovalRequiredException​

ApprovalRequiredException(int status, String code, String message, JsonNode details, String requestId, Long retryAfterSeconds)

Creates the exception from the fields of the error envelope; EaiException.fromResponse picks it from the code.

NameTypeDefaultRequiredDescription
statusintyesHTTP status of the response, 0 for a network error.
codeStringyesStable machine code of the error, such as policy_denied.
messageStringyesMessage already localized in the client language.
detailsJsonNodeyeserror.details of the envelope, redacted; null becomes a MissingNode.
requestIdStringyeserror.request_id or the X-Request-Id header, may be null.
retryAfterSecondsLongyesRetry-After delay in seconds, or null.

ApprovalRequiredException.approvalId​

String approvalId()

Pending approval id from details.approval_id, or null.

This element takes no parameter.

Returns: String. The pending approval id, or null when details.approval_id is absent.