24 Proxy Services: Error Handlers

This chapter describes how to implement error handling in message flows.

You can configure error handling at the message flow, pipeline, route node, and stage level.

24.1 Edit Error Handler Page

You can configure error handling at the message flow, pipeline, route node, and stage level.

Configure error handlers on the Edit Error Handler page. You must always add at least one stage to the page to specify how the error handler will work. See the following topics:

24.2 Adding Proxy Service Error Handlers

Before you begin

These instructions assume you are already editing a message flow in the Edit Message Flow page, as explained in Section 21.1, "Viewing and Editing Message Flows."

To add a proxy service Error Handler

  1. Click the Proxy Service icon, then click Add Service Error Handler. The Edit Error Handler page is displayed.

  2. Click the Error Handler icon, then click Add Stage.

  3. Click the Stage icon, then click Edit Stage. The Edit Stage Configuration page is displayed.

  4. Click Add an Action, then select the action you want to add.

    An error handler is a pipeline and is therefore configured like any other pipeline. For example, you can use the Publish action to send error notifications to other services, use the Assign action to modify the context variables, and so on. See Section 22.1, "Adding and Editing Actions in Message Flows." There is no restriction on what actions may be chained together.

    Three commonly-used error actions are Raise Error, Reply, and Resume.

  5. Add other actions and make other edits on the Edit Stage Configuration page, as desired.

  6. On the Edit Stage Configuration page, click Save to commit the updates in the current session.

  7. On the Edit Error Handler page, click Save to commit the updates in the current session.

After you finish

On the Edit Message Flow page, continue to construct the message flow, as described in Section 21.1, "Viewing and Editing Message Flows."

24.3 Adding Pipeline Error Handlers

Before you begin

These instructions assume you are already editing a message flow in the Edit Message Flow page, as explained in Section 21.1, "Viewing and Editing Message Flows."

The instructions also assume you have created a pipeline pair node, as explained in Section 21.4, "Adding Pipeline Pair Nodes to Message Flows."

To add a Pipeline Error Handler

  1. Navigate to the pipeline pair node containing the pipeline to which you want to add an error handler. If the pipeline pair is not already expanded, click the plus sign next to the icon to display the pipelines.

  2. Click the Request Pipeline icon or the Response Pipeline icon, then click Add Pipeline Error Handler. The Edit Error Handler page is displayed.

  3. Click the Error Handler icon, then click Add Stage.

  4. Click the Stage icon, click Edit Stage. The Edit Stage Configuration page is displayed.

  5. Click Add an Action, then select the action you want to add.

    An error handler is a pipeline and is therefore configured like any other pipeline. For example, you can use the Publish action to send error notifications to other services, use the Assign action to modify the context variables, and so on. To learn more about the type of action you want to add, see the appropriate procedure in Section 22.1, "Adding and Editing Actions in Message Flows." There is no restriction on what actions may be chained together.

    Three commonly-used error actions are Raise Error, Reply, and Resume.

  6. Add other actions and make other edits on the Edit Stage Configuration page, as desired.

  7. On the Edit Stage Configuration page, click Save to commit the updates in the current session.

  8. On the Edit Error Handler page, click Save to commit the updates in the current session.

After you finish

On the Edit Message Flow page, continue to construct the message flow, as described in Section 21.1, "Viewing and Editing Message Flows."

24.4 Adding Stage Error Handlers

Before you begin

These instructions assume you are already editing a message flow in the Edit Message Flow page, as explained in Section 21.1, "Viewing and Editing Message Flows."

The instructions also assume you have added a stage to a pipeline, as explained in Section 21.7, "Adding Stages to Pipelines."

To add a Stage Error Handler

  1. Navigate to the stage to which you want to add error handling.

  2. Click the Stage icon, then click Add Stage Error Handler. The Edit Error Handler page is displayed.

  3. Click the Error Handler icon, then click Add Stage.

  4. Click the Stage icon, then click Edit Stage. The Edit Stage Configuration page is displayed.

  5. Click Add an Action, then select the action you want to add.

    An error handler is a pipeline and is therefore configured like any other pipeline. For example, you can use the Publish action to send error notifications to other services, use the Assign action to modify the context variables, and so on. To learn more about the type of action you want to add, see the appropriate procedure in Section 22.1, "Adding and Editing Actions in Message Flows." There is no restriction on what actions may be chained together.

    Three commonly-used error actions are Raise Error, Reply, and Resume.

  6. Add other actions and make other edits on the Edit Stage Configuration page, as desired.

  7. Click Save to commit the updates in the current session.

After you finish

On the Edit Message Flow page, continue to construct the message flow, as described in Section 21.1, "Viewing and Editing Message Flows."

24.5 Adding Route Node Error Handlers

Before you begin

These instructions assume you are already editing a message flow in the Edit Message Flow page, as explained in Section 21.1, "Viewing and Editing Message Flows."

The instructions also assume you have created a route node, as explained in Section 21.8, "Adding Route Nodes to Message Flows."

To add a Route Node Handler

  1. Click the Route Node icon, then click Add Error Handler. The Edit Error Handler page is displayed.

  2. Click the Error Handler icon, then click Add Stage.

  3. Click the Stage icon, then click Edit Stage. The Edit Stage Configuration page is displayed.

  4. Click Add an Action, then select the action you want to add.

    Since an error handler is another pipeline, it is configured like any other pipeline. For example, the Publish action may be used to send error notifications to other services, the Assign action may be used to modify the context variables, and so on. To learn more about the type of action you want to add, see the appropriate procedure in Section 22.1, "Adding and Editing Actions in Message Flows." There is no restriction on what actions may be chained together.

    Three commonly-used error actions are Raise Error, Reply, and Resume.

  5. Add other actions and make other edits on the Edit Stage Configuration page, as desired.

  6. On the Edit Stage Configuration page, click Save to commit the updates in the current session.

  7. On the Edit Error Handler page, click Save to commit the updates in the current session.

After you finish

On the Edit Message Flow page, continue to construct the message flow, as described in Section 21.1, "Viewing and Editing Message Flows."

24.6 Editing Error Handlers

Before you begin

These instructions assume you are already editing a message flow in the Edit Message Flow page, as explained in Section 21.1, "Viewing and Editing Message Flows."

To view and change an Error Handler

Do one of the following:

Table 24-1 Viewing and Changing the Error Handler

To... Complete This Step...

View and change the proxy service message flow error handler

Click the Proxy Service icon, then click Edit Service Error Handler. The Edit Error Handler page is displayed. See Section 24.2, "Adding Proxy Service Error Handlers."

View and change the pipeline error handler

Click the appropriate Request Pipeline icon or the Response Pipeline icon, then click Edit Pipeline Error Handler. The Edit Error Handler page is displayed. See Section 24.3, "Adding Pipeline Error Handlers."

View and change the route node error handler

Click the appropriate Route Node icon, then click Edit Route Error Handler. The Edit Error Handler page is displayed. See Section 24.5, "Adding Route Node Error Handlers."

View and change the stage error handler

Click the appropriate Stage icon, then click Edit Stage Error Handler. The Edit Error Handler page is displayed. See Section 24.4, "Adding Stage Error Handlers."


After you finish

On the Edit Message Flow page, continue to construct the message flow, as described in Section 21.1, "Viewing and Editing Message Flows."