<@U04S8PLJWMT> how to add error handler in connect...
# ask-ai
s
@kapa.ai how to add error handler in connector yaml manifest
k
To add an error handler in an Airbyte connector YAML manifest, you need to use the
error_handler
field under your
requester
configuration. The error handler can be customized to define how different HTTP errors or response conditions are handled, such as retrying, ignoring, or failing on certain status codes or error messages. Here’s a basic example of how to add an error handler that retries on HTTP 404 errors:
Copy code
yaml requester:   # ... other requester config ...   error_handler:     response_filters:       - http_codes: [404]         action: RETRY
You can also ignore certain errors:
Copy code
yaml requester:   # ... other requester config ...   error_handler:     response_filters:       - http_codes: [404]         action: IGNORE
Or, you can use predicates to match on response content:
Copy code
yaml requester:   # ... other requester config ...   error_handler:     response_filters:       - predicate: "{{ 'code' in response }}"         action: IGNORE
For advanced scenarios, you can define multiple filters or use composite error handlers with different backoff strategies. For example, to retry on 429 errors and ignore 404 errors:
Copy code
yaml requester:   # ... other requester config ...   error_handler:     response_filters:       - http_codes: [404]         action: IGNORE       - http_codes: [429]         action: RETRY
For more advanced error handling, such as using composite error handlers or custom backoff strategies, refer to the [advanced error handling documentation](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/error-handling#advanced-error-handling). All these examples and more details can be found in the official Airbyte documentation: - [Error handling](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/error-handling)