Skip to content

Commit 41e88a8

Browse files
Source Hubspot: extend error logging (#14054)
* #291 incall - source Hubspot: extend error logging * huspot: upd changelog * auto-bump connector version Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
1 parent 273fcaa commit 41e88a8

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@
398398
- name: HubSpot
399399
sourceDefinitionId: 36c891d9-4bd9-43ac-bad2-10e12756272c
400400
dockerRepository: airbyte/source-hubspot
401-
dockerImageTag: 0.1.71
401+
dockerImageTag: 0.1.72
402402
documentationUrl: https://docs.airbyte.io/integrations/sources/hubspot
403403
icon: hubspot.svg
404404
sourceType: api

airbyte-config/init/src/main/resources/seed/source_specs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3658,7 +3658,7 @@
36583658
supportsNormalization: false
36593659
supportsDBT: false
36603660
supported_destination_sync_modes: []
3661-
- dockerImage: "airbyte/source-hubspot:0.1.71"
3661+
- dockerImage: "airbyte/source-hubspot:0.1.72"
36623662
spec:
36633663
documentationUrl: "https://docs.airbyte.io/integrations/sources/hubspot"
36643664
connectionSpecification:

airbyte-integrations/connectors/source-hubspot/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ COPY source_hubspot ./source_hubspot
3434
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
3535
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
3636

37-
LABEL io.airbyte.version=0.1.71
37+
LABEL io.airbyte.version=0.1.72
3838
LABEL io.airbyte.name=airbyte/source-hubspot

airbyte-integrations/connectors/source-hubspot/source_hubspot/streams.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) 2022 Airbyte, Inc., all rights reserved.
33
#
44

5-
5+
import json
66
import sys
77
import time
88
from abc import ABC, abstractmethod
@@ -368,7 +368,10 @@ def read_records(
368368
raise e
369369

370370
def parse_response_error_message(self, response: requests.Response) -> Optional[str]:
371-
body = response.json()
371+
try:
372+
body = response.json()
373+
except json.decoder.JSONDecodeError:
374+
return response.text
372375
if body.get("category") == "MISSING_SCOPES":
373376
if "errors" in body:
374377
errors = body["errors"]

docs/integrations/sources/hubspot.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ The HubSpot source connector supports the following streams:
9090
Objects in the `engagements` stream can have one of the following types: `note`, `email`, `task`, `meeting`, `call`. Depending on the type of engagement, different properties is set for that object in the `engagements_metadata` table in the destination:
9191

9292
- A `call` engagement has a corresponding `engagements_metadata` object with non-null values in the `toNumber`, `fromNumber`, `status`, `externalId`, `durationMilliseconds`, `externalAccountId`, `recordingUrl`, `body`, and `disposition` columns.
93-
- An `email` engagement has a corresponding `engagements_metadata` object with with non-null values in the `subject`, `html`, and `text` columns. In addition, there will be records in four related tables, `engagements_metadata_from`, `engagements_metadata_to`, `engagements_metadata_cc`, `engagements_metadata_bcc`.
93+
- An `email` engagement has a corresponding `engagements_metadata` object with non-null values in the `subject`, `html`, and `text` columns. In addition, there will be records in four related tables, `engagements_metadata_from`, `engagements_metadata_to`, `engagements_metadata_cc`, `engagements_metadata_bcc`.
9494
- A `meeting` engagement has a corresponding `engagements_metadata` object with non-null values in the `body`, `startTime`, `endTime`, and `title` columns.
9595
- A `note` engagement has a corresponding `engagements_metadata` object with non-null values in the `body` column.
9696
- A `task` engagement has a corresponding `engagements_metadata` object with non-null values in the `body`, `status`, and `forObjectType` columns.
@@ -129,7 +129,8 @@ Now that you have set up the Mailchimp source connector, check out the following
129129

130130
| Version | Date | Pull Request | Subject |
131131
|:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------|
132-
| 0.1.71 | 2022-06-24 | [14102](https://github.com/airbytehq/airbyte/pull/14102) | Removed legacy `AirbyteSentry` dependency from the code
132+
| 0.1.72 | 2022-06-24 | [14054](https://github.com/airbytehq/airbyte/pull/14054) | Extended error logging |
133+
| 0.1.71 | 2022-06-24 | [14102](https://github.com/airbytehq/airbyte/pull/14102) | Removed legacy `AirbyteSentry` dependency from the code |
133134
| 0.1.70 | 2022-06-16 | [13837](https://github.com/airbytehq/airbyte/pull/13837) | Fix the missing data in CRM streams issue |
134135
| 0.1.69 | 2022-06-10 | [13691](https://github.com/airbytehq/airbyte/pull/13691) | Fix the `URI Too Long` issue |
135136
| 0.1.68 | 2022-06-08 | [13596](https://github.com/airbytehq/airbyte/pull/13596) | Fix for the `property_history` which did not emit records |

0 commit comments

Comments
 (0)