Send Action Errors to a Channel

When an action returns an error, you can send the error details to another channel. This allows you to run error-handling actions or consolidate results from multiple actions.

If you do not configure error output for an action, processing from that action stops when an error occurs.

Configure Error Output

  1. Open the Studio tab of the Flux App in Soracom Flux Studio.

    For more details, see Open a Flux App in Soracom Flux Studio.

  2. Click the action for which you want to configure error output.

    The action settings panel is displayed.

  3. Error Output: Configure the action to send error details to another channel.

    Field Description
    Send action error to another channel Set to Enabled.
    Destination Channel Select how to specify the destination channel:
    Create a new channel Select this option to create a new channel and enter the channel name in Channel Name.
    Select an existing channel Select this option to choose an existing channel from the dropdown.

    Error Output settings for an action

  4. Click Update.

    An error output channel is added to the action.

Advanced Settings

Under Error Output > Advanced settings, you can transform the data before sending it to another channel. For details on behavior shared with action output settings, see Advanced Action Output Settings.

Enable Transform data and configure the following fields:

Field Description
Content-Type Specify the Content-Type of the data to be sent to another channel.
Content Configure the transformation content. The transformed result is treated as the error output. Use ${payload.xxx} to reference the input to the action. Use ${error.xxx} to reference the error details.

Example: Send both the action input (${payload}) and the error details (${error}) together.

{
  "payload": "${payload}",
  "error": "${error}"
}

In error output, ${result} is null.

You can extract or compute intermediate data during the Flux App execution. For details on supported expressions, see Use Expressions in Actions.