We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f0b490 commit d072d5eCopy full SHA for d072d5e
src/snowflake/connector/network.py
@@ -1034,12 +1034,15 @@ def _request_exec_wrapper(
1034
time.sleep(float(retry_ctx.current_sleep_time))
1035
retry_ctx.increment()
1036
1037
- reason = cause.errno if cause.errno is not None else 0
1038
- reason = (
1039
- reason - ER_HTTP_GENERAL_ERROR
1040
- if reason >= ER_HTTP_GENERAL_ERROR
1041
- else reason
1042
- )
+ reason = getattr(cause, "errno", 0)
+ if reason is None:
+ reason = 0
+ else:
+ reason = (
+ reason - ER_HTTP_GENERAL_ERROR
1043
+ if reason >= ER_HTTP_GENERAL_ERROR
1044
+ else reason
1045
+ )
1046
retry_ctx.retry_reason = reason
1047
1048
if "Connection aborted" in repr(e) and "ECONNRESET" in repr(e):
0 commit comments