You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: airbyte-integrations/connectors/source-salesforce/source_salesforce/rate_limiting.py
+35-5
Original file line number
Diff line number
Diff line change
@@ -15,19 +15,50 @@
15
15
exceptions.ReadTimeout,
16
16
exceptions.ConnectionError,
17
17
exceptions.HTTPError,
18
+
# We've had a couple of customers with ProtocolErrors, namely:
19
+
# * A self-managed instance during `BulkSalesforceStream.download_data`. This customer had an abnormally high number of ConnectionError
20
+
# which seems to indicate problems with his network infrastructure in general. The exact error was: `urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(905 bytes read, 119 more expected)', IncompleteRead(905 bytes read, 119 more expected))`
21
+
# * A cloud customer with very long syncs. All those syncs would end up with the following error: `urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))`
22
+
# Without much more information, we will make it retryable hoping that performing the same request will work.
23
+
exceptions.ChunkedEncodingError,
24
+
# We've had examples where the response from Salesforce was not a JSON response. Those cases where error cases though. For example:
25
+
# https://github.com/airbytehq/airbyte-internal-issues/issues/6855. We will assume that this is an edge issue and that retry should help
26
+
exceptions.JSONDecodeError,
18
27
)
19
28
29
+
_RETRYABLE_400_STATUS_CODES= {
30
+
# Using debug mode and breakpointing on the issue, we were able to validate that there issues are retryable. We've also opened a case
31
+
# with Salesforce to try to understand what is causing that as the response does not have a body.
32
+
406,
33
+
# Most of the time, they don't have a body but there was one from the Salesforce Edge mentioning "We are setting things up. This process
34
+
# can take a few minutes. This page will auto-refresh when ready. If it takes too long, please contact support or visit our <a>status
35
+
# page</a> for more information." We therefore assume this is a transient error and will retry on it.
0 commit comments