Application Integration은 통합에서 발생한 오류를 발생, 포착, 재시도, 맞춤설정하기 위해 다음 오류 처리 방법을 지원합니다.
오류 처리 전략: 태스크의 오류 처리 전략은 일시적인 오류로 인해 태스크가 실패할 경우 수행할 작업을 지정합니다. 동기 실행 모드와 비동기 실행 모드 모두에 서로 다른 오류 처리 전략을 지정할 수 있습니다.
오류 포착자: 오류 포착자는 통합에서 식별된 트리거, 태스크 또는 에지 조건의 실패를 처리하는 맞춤설정된 방법을 정의합니다. 단일 통합에서 하나 이상의 오류 포착자를 정의하여 태스크 오류 또는 실행 실패를 처리할 수 있습니다. 각 오류 포착자는 오류 포착자 트리거라는 트리거를 사용하여 호출되어 오류를 처리하도록 맞춤설정으로 구성된 통합 태스크 집합을 실행할 수 있습니다.
통합 실행의 동기 모드와 비동기 모드 모두에 오류 처리 방법을 사용할 수 있습니다.
동기 실행: 동기 모드에서는 통합 실행 직후에 통합 실행 결과를 사용할 수 있습니다. 동기 모드는 통합 실행 직후 실행 결과를 원하는 상황에 유용합니다. 동기 모드에서 통합을 실행하는 트리거에는 다음이 포함됩니다.
비동기 실행: 비동기 실행은 파이어 앤 포겟(fire and forget) 모델을 사용합니다. 비동기 모드는 통합이 실행하는 데 오랜 시간이 걸릴 수 있거나 통합 실행 직후 실행 결과가 필요하지 않은 상황에 유용합니다. 비동기 모드에서 통합을 실행하는 트리거에는 다음이 포함됩니다.
동기식이 아닌 모든 실행은 비동기 모드로 실행됩니다. 일반적인 비동기 모드 중 일부에는 다음이 포함되지만 이에 국한되지 않습니다.
정지 또는 승인 태스크에서 다시 시작된 실행은 초기 실행이 동기 모드였더라도 동기 모드로 실행됩니다.
권장사항
통합에서 오류 처리 전략과 오류 포착자를 모두 사용합니다. 통합은 오류가 발생할 때 오류 처리 섹션에 정의된 전략을 따릅니다. 구성된 오류 처리 전략을 모두 사용한 후 오류 포착자 로직이 트리거됩니다. 시스템 변수를 사용하여 오류 코드 및 오류 메시지의 값을 캡처하여 오류 포착기 흐름으로 전송합니다.
예
주문을 생성하는 통합 흐름이 있다고 가정해 보겠습니다. MySQL용 Cloud SQL에서 새 주문이 생성됩니다. 이 흐름은 커넥터 태스크 (이 예에서는 주문 생성)를 사용하여 MySQL용 Cloud SQL에 연결합니다. 데이터베이스 서비스 중단 시 커넥터 작업이 데이터베이스에 새 주문을 삽입하는 동안 오류를 발생시킵니다. 통합에서는 오류 처리 전략과 오류 포착자를 모두 사용하는 것이 좋습니다.
오류 처리 전략을 추가하려면 통합 디자이너에서 커넥터 태스크를 클릭하여 태스크 구성 창을 엽니다. 다음 다이어그램은 주문 생성 커넥터 태스크에 구성된 오류 처리 전략을 보여줍니다.
오류 처리 전략을 추가하려면 통합 디자이너에서 REST 엔드포인트 호출 태스크를 클릭하여 태스크 구성 창을 엽니다. 다음 다이어그램은 REST 엔드포인트 호출 태스크에 구성된 오류 처리 전략을 보여줍니다.
오류 포착자를 추가하려면 통합 디자이너에서 REST 엔드포인트 호출 태스크를 클릭하여 태스크 구성 창을 엽니다. 오류 포착자 섹션에서 오류 포착자 세부정보를 추가합니다. 다음 다이어그램은 REST 엔드포인트 호출 태스크에 구성된 오류 포착자를 보여줍니다.
오류 코드
다음 표에서는 발생 가능한 오류 및 그러한 오류의 해당 원인을 설명합니다. Application Integration은 google.rpc.Code에 정의된 표준 오류 코드를 사용합니다.
Application Integration 오류 및 여러 다른 오류 처리 전략에 대한 자세한 내용은 오류 및 오류 처리를 참조하세요.
표준 예외 유형
표준 코드
HTTP 코드
설명
FailedPreconditionException
FAILED_PRECONDITION
400
현재 시스템 상태에서는 요청을 실행할 수 없습니다.
BadRequestException
INVALID_ARGUMENT
400
클라이언트가 잘못된 인수를 지정했습니다. 자세한 내용은 오류 메시지와 오류 세부정보에서 확인하세요.
UnauthenticatedException
UNAUTHENTICATED
401
OAuth 토큰이 누락되었거나, 잘못되었거나, 만료되어 요청을 인증할 수 없습니다.
ForbiddenException
PERMISSION_DENIED
403
클라이언트에게 충분한 권한이 없습니다. 이 오류는 OAuth 토큰의 범위가 잘못되었거나, 클라이언트에게 필요한 권한이 없거나, API가 사용 설정되지 않은 경우에 발생할 수 있습니다.
NotFoundException
NOT_FOUND
404
지정된 리소스를 찾을 수 없습니다.
AlreadyExistsException
ALREADY_EXISTS
409
클라이언트가 만들려고 했던 리소스가 이미 존재합니다.
InternalError
INTERNAL
500
내부 서버 오류가 발생하였습니다. 전형적인 서버 버그입니다. 태스크 또는 트리거가 잘못 구성된 경우 발생할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-03(UTC)"],[[["\u003cp\u003eApplication Integration distinguishes between permanent errors (client-side) and temporary errors (server-side), each leading to permanent or temporary task failures respectively.\u003c/p\u003e\n"],["\u003cp\u003eError messages can be found in the Execution logs page for integration execution errors and in the Integration editor page for publishing errors.\u003c/p\u003e\n"],["\u003cp\u003eApplication Integration offers error handling strategies to specify actions upon temporary task failures, and error catchers to define custom responses to specific task or execution failures.\u003c/p\u003e\n"],["\u003cp\u003eIntegrations can be executed in synchronous mode, where results are immediate, or asynchronous mode, suitable for long-running or non-immediate result scenarios.\u003c/p\u003e\n"],["\u003cp\u003eAs a best practice, both error handling strategies and error catchers should be implemented, as the integration will first exhaust its configured strategy and then utilize the error catcher upon failure.\u003c/p\u003e\n"]]],[],null,["# Introduction to error handling\n\nSee the [supported connectors](/integration-connectors/docs/connector-reference-overview) for Application Integration.\n\nIntroduction to error handling\n==============================\n\n\nIn 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:\n\n- **Permanent errors:** All client-side errors such as, authentication failures, data validation errors, are considered as permanent errors. Permanent errors cause permanent task failures.\n- **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.\n\n\nError messages appear in the following locations:\n\n- **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, see [Execution logs](/application-integration/docs/viewing-logs).\n- **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, see [Integration editor](/application-integration/docs/integrations-ui-layout).\n\nFor information on the list of error codes that you might encounter, see [Error codes](#codes).\n\nError handling methods\n----------------------\n\n\nApplication Integration supports the following error handling methods to throw, catch, retry, and customize the errors encountered in your integration:\n\n- [**Error handling strategies**](/application-integration/docs/error-handling-strategy): 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.\n- [**Error catcher**](/application-integration/docs/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 the [Error Catcher trigger](/application-integration/docs/configure-error-catcher-trigger), to run the set of configured integration tasks customized to handle the error.\n\nYou can use error handling methods for both synchronous and asynchronous modes of integration execution:\n\n- **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:\n - [Test or publish an integration](/application-integration/docs/test-publish-integrations)\n - Call the [`projects.locations.integrations.execute`](/application-integration/docs/reference/rest/v1/projects.locations.integrations/execute) API\n - Call the integration from a [sub-integration in the synchronous mode](/application-integration/docs/configure-call-integration-task)\n- **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:\n - All execution that are not synchronous are executed in asynchronous mode. Some of the common asynchronous mode includes, but is not limited to:\n - [Schedule trigger](/application-integration/docs/configure-schedule-trigger)\n - [Cloud Scheduler trigger](/application-integration/docs/configure-cloud-scheduler-trigger)\n - [Cloud Pub/Sub trigger](/application-integration/docs/configure-pubsub-trigger)\n - [Salesforce trigger](/application-integration/docs/configure-salesforce-trigger)\n - Call the [`projects.locations.integrations.schedule`](/application-integration/docs/reference/rest/v1/projects.locations.integrations/schedule) API\n - Executions that are resumed from a suspension or a approval task are also executed in aynchronous mode, even if the initial execution was is synchronous mode.\n\nBest practice\n-------------\n\nUse both [error handling strategy](/application-integration/docs/error-handling-strategy) and [error catcher](/application-integration/docs/error-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. Use [system variables](/application-integration/docs/variables#system-variables) to capture the value of error code and error message to send to your error catcher flow.\n\nExample\n-------\n\nSuppose you have an integration flow to create an order. New orders are created in Cloud SQL for MySQL. The flow uses a [connector task](/application-integration/docs/configure-connectors-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 both [error handling strategy](#error-handling-strategy) and [error catcher](#error-catcher) in your integration.\n\nTo 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 the **Create an order** connector task:\n\n\nTo add the error handling strategy, click the **Call REST Endpoint** task in the integration designer to open the task configuration pane. The following diagram shows the error handling strategy configured for the **Call REST Endpoint** task:\n\n\nTo add the error catcher, click the **Call REST Endpoint** task in the integration designer to open the task configuration pane. In the **Error Catcher** section, add the error catcher details. The following diagram shows the error catcher configured for the **Call REST Endpoint** task:\n\n\nError codes\n-----------\n\n\nThe following table describes the errors that you might encounter, and the corresponding causes for the errors. Application Integration uses the canonical error codes defined in [`google.rpc.Code`](https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto).\n\nFor information about Application Integration errors and different error handling strategies, see [Errors and error handling](/application-integration/docs/error-handling)."]]