---
schema_version: "1"
id: 6e6837ded4bd3b6f01eb9c57e9607f72845c075ea84a84bca4f67fbb2835f9a3
title: Action.Error Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_Invocable_Action_Error.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Invocable_Action_Error.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 5b6e8f653f689f77f5346e767047ce4dff17157c976082d553ca1b066e4a8946
description: Contains methods to retrieve errors returned by invocable actions.Creates a copy of the Invocable.Action.Error.Gets the error code returned by an invocable action.Gets the error message returned by an invocable action.
---
# Action.Error Class

Contains methods to retrieve errors returned by invocable actions.

## Namespace

[Invocable](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_Invocable.htm "The Invocable namespace provides classes for calling invocable actions from Apex.")

- **[Action.Error Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Invocable_Action_Error.htm#apex_Invocable_Action_Error_methods)**

## Action.Error Methods

These methods are for Action.Error.

- **[clone()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Invocable_Action_Error.htm#apex_Invocable_Action_Error_clone)**  
    Creates a copy of the Invocable.Action.Error.
- **[getCode()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Invocable_Action_Error.htm#apex_Invocable_Action_Error_getCode)**  
    Gets the error code returned by an invocable action.
- **[getMessage()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_Invocable_Action_Error.htm#apex_Invocable_Action_Error_getMessage)**  
    Gets the error message returned by an invocable action.

### clone()

Creates a copy of the Invocable.Action.Error.

#### Signature

public Object clone()

#### Return Value

Type: Object

### getCode()

Gets the error code returned by an invocable action.

#### Signature

public String getCode()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### getMessage()

Gets the error message returned by an invocable action.

#### Signature

public String getMessage()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")