Introduction to error handling

In Application Integration, errors might occur when you're testing and publishing an integration, or during the execution of an integration. These errors can occur due to various client-side and server-side issues, and are broadly classified as follows:

  • Permanent errors: All client-side errors such as, authentication failures, data validation errors, are considered as permanent errors. Permanent errors cause permanent task failures.
  • Temporary errors: All server-side errors such as, HTTP 503 (service unavailable), HTTP 400 (bad request), are considered as temporary errors. Temporary errors cause temporary task failures.

Error messages appear in the following locations:

  • Execution logs page: Displays errors encountered during the execution of an integration. Each execution of an integration has a separate log entry. For information about execution logs page, seeExecution logs.
  • Integration editor page: Displays errors encountered when you publish an integration. The errors are displayed at the bottom of the integration editor page. For information about the integration editor page, seeIntegration editor.

For information on the list of error codes that you might encounter, seeError codes.

Error handling methods

Application Integration supports the following error handling methods to throw, catch, retry, and customize the errors encountered in your integration:

  • Error handling strategies: The error handling strategy for a task specifies the action to take if the task fails due to a temporary error. You can specify different error handling strategies for both synchronous and asynchronous execution modes.
  • Error catcher: Error catcher defines a customized way to handle the failure of an identified trigger, task, or edge condition in your integration. You can define one or more error catchers in a single integration to handle task errors and/or execution failures. Each error catcher can be invoked using a trigger, called theError Catcher trigger, to run the set of configured integration tasks customized to handle the error.

You can use error handling methods for both synchronous and asynchronous modes of integration execution:

  • Synchronous executions: In synchronous mode, the execution result of the integration is available soon after the integration runs. Synchronous mode is helpful in scenarios where you want the execution result immediately after the integration runs. Triggers execute the integration in the synchronous mode include the following:
  • Asynchronous executions: Asynchronous executions use the fire and forget model. Asynchronous mode is helpful in scenarios where integrations can take a long time to run, or the execution result is not required immediately after the integration runs. Triggers that execute the integration in the asynchronous mode include the following:

Best practice

Use botherror handling strategy anderror catcher in your integration. For any error, the integration follows the strategy defined in the error handling section. After exhausting the error handling strategy that are configured, error catcher logic is triggered. Usesystem variables to capture the value of error code and error message to send to your error catcher flow.

Example

Suppose you have an integration flow to create an order. New orders are created in Cloud SQL for MySQL. The flow uses aconnector task (Create an order in this example) to connect to Cloud SQL for MySQL. In case of a database outage, the connector task throws errors while inserting new orders into the database. As a best practice, you must use botherror handling strategy anderror catcher in your integration.

To add the error handling strategy, click the connector task in the integration designer to open the task configuration pane. The following diagram shows the error handling strategy configured for theCreate an order connector task:

Error handling strategy for Create an order connector taskError handling strategy for Create an order connector task

To add the error handling strategy, click theCall REST Endpoint task in the integration designer to open the task configuration pane. The following diagram shows the error handling strategy configured for theCall REST Endpoint task:

Error handling strategy for the Call REST Endpoint taskError handling strategy for the Call REST Endpoint task

To add the error catcher, click theCall REST Endpoint task in the integration designer to open the task configuration pane. In theError Catcher section, add the error catcher details. The following diagram shows the error catcher configured for theCall REST Endpoint task:

Error catcher for the Call REST Endpoint taskError catcher for the Call REST Endpoint task

Error codes

The following table describes the errors that you might encounter, and the corresponding causes for the errors. Application Integration uses the canonical error codes defined ingoogle.rpc.Code.

For information about Application Integration errors and different error handling strategies, seeErrors and error handling.

Standard exception typeCanonical codeHTTP codeDescription
FailedPreconditionExceptionFAILED_PRECONDITION400Request can not be executed in the current system state.
BadRequestExceptionINVALID_ARGUMENT400Client specified an invalid argument. Check error message and error details for more information.
UnauthenticatedExceptionUNAUTHENTICATED401Request not authenticated due to missing, invalid, or expired OAuth token.
ForbiddenExceptionPERMISSION_DENIED403Client does not have sufficient permission. This can happen if the OAuth token doesn't have the right scopes, the client doesn't have the required permissions, or the API has not been enabled.
NotFoundExceptionNOT_FOUND404A specified resource is not found.
AlreadyExistsExceptionALREADY_EXISTS409The resource that a client tried to create already exists.
InternalErrorINTERNAL500Internal server error. Typically a server bug. This can happen if any of the tasks or triggers are incorrectly configured.
UnimplementedExceptionUNIMPLEMENTED501API method not implemented by the server.
ServiceUnavailableExceptionUNAVAILABLE503Service unavailable. Typically the server is down.
AbortedExceptionABORTED409Response size is too large.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.