Class ReturnElementErrorAction

ReturnElementErrorAction

A ReturnElementErrorAction indicates that an error occurred during element invocation.

Only available for Google Workspace add-ons that extend Google Workspace Studio.

Sample usage:

const workflowAction = AddOnsResponseService.newReturnElementErrorAction()
.setErrorActionability(
  AddOnsResponseService.ErrorActionability.NOT_ACTIONABLE
)
.setErrorRetryability(
  AddOnsResponseService.ErrorRetryability.NOT_RETRYABLE
)
// Set the user-facing error log
.setErrorLog(
  AddOnsResponseService.newWorkflowTextFormat()
    .addTextFormatElement(
      AddOnsResponseService.newTextFormatElement()
        .setText("Failed to create Google Doc.")
    )
);

Methods

MethodReturn typeBrief description
setErrorActionability(errorActionability)ReturnElementErrorActionSets the error actionability, an error should be actionable if it can be resolved by re-configuring the step.
setErrorLog(log)ReturnElementErrorActionSets the error log to be displayed to the end user at Workflow's activity feed.
setErrorRetryability(errorRetryability)ReturnElementErrorActionSets the error retry-ability, the flow terminates after the first try if an error is not retryable.

Detailed documentation

setErrorActionability(errorActionability)

Sets the error actionability, an error should be actionable if it can be resolved by re-configuring the step. A "Fix it" link is displayed to the user to re-configure the step.

Parameters

NameTypeDescription
errorActionabilityErrorActionabilityThe error actionability.

Return

ReturnElementErrorAction — This return element error action, for chaining.


setErrorLog(log)

Sets the error log to be displayed to the end user at Workflow's activity feed.

Parameters

NameTypeDescription
logWorkflowTextFormatThe error log for the end user.

Return

ReturnElementErrorAction — This return element error action, for chaining.


setErrorRetryability(errorRetryability)

Sets the error retry-ability, the flow terminates after the first try if an error is not retryable. Otherwise, Workflow is going to try to execute the Step for up to 5 times.

Parameters

NameTypeDescription
errorRetryabilityErrorRetryabilityThe ErrorRetryability.

Return

ReturnElementErrorAction — This return element error action, for chaining.