From 0f184577bfd86ae2bb22ff1f4041d3a2299012e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Viande?= Date: Fri, 6 Sep 2024 16:06:57 +0200 Subject: [PATCH] connector getLago: ignore 405 response for customer usage GetLago return a http 405 status code if the customer doesn't have any usage see https://github.com/getlago/lago-api/blob/1cc20119783ba9ffcec99071cb0fa4ff3d1752d2/spec/services/invoices/customer_usage_service_spec.rb#L282 --- .../connectors/source-getlago/manifest.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/airbyte-integrations/connectors/source-getlago/manifest.yaml b/airbyte-integrations/connectors/source-getlago/manifest.yaml index 0a0d9e2a0d99..62aea7466d00 100644 --- a/airbyte-integrations/connectors/source-getlago/manifest.yaml +++ b/airbyte-integrations/connectors/source-getlago/manifest.yaml @@ -318,6 +318,17 @@ definitions: $ref: "#/definitions/base_requester" path: /customers/{{stream_slice.customer_external_id}}/current_usage http_method: GET + error_handler: + type: CompositeErrorHandler + error_handlers: + - type: DefaultErrorHandler + response_filters: + - type: HttpResponseFilter + action: IGNORE + predicate: >- + {{response.status == 405 and response.code == + 'no_active_subscription' }} + http_codes: [] record_selector: type: RecordSelector extractor: