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:

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

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#setErrorActionability(ErrorActionability)` | `https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#` | Sets the error actionability, an error should be actionable if it can be resolved by re-configuring the step. |
| `https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#setErrorLog(WorkflowTextFormat)` | `https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#` | Sets the error log to be displayed to the end user at Workflow's activity feed. |
| `https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#setErrorRetryability(ErrorRetryability)` | `https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#` | Sets 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

| Name | Type | Description |
|---|---|---|
| `errorActionability` | `https://developers.google.com/apps-script/reference/add-ons-response-service/error-actionability` | The error actionability. |

#### Return


`https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#` --- 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

| Name | Type | Description |
|---|---|---|
| `log` | `https://developers.google.com/apps-script/reference/add-ons-response-service/workflow-text-format` | The error log for the end user. |

#### Return


`https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#` --- 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

| Name | Type | Description |
|---|---|---|
| `errorRetryability` | `https://developers.google.com/apps-script/reference/add-ons-response-service/error-retryability` | The `https://developers.google.com/apps-script/reference/add-ons-response-service/error-retryability`. |

#### Return


`https://developers.google.com/apps-script/reference/add-ons-response-service/return-element-error-action#` --- This return element error action, for chaining.