Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

Inconsistent SSLError Handling #14

Open

Description

@tucked

The SDK claims support for urllib3 >= 1.15:

REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]

In urllib3 1.22, MaxRetryError is raised instead of SSLError directly:

Made the connection pool retry on SSLError. The original SSLError is available on MaxRetryError.reason. (Issue #1112)

This means that if urllib3 >= 1.22 is used, this code is bypassed:

except urllib3.exceptions.SSLError as e:
msg = "{0}\n{1}".format(type(e).__name__, str(e))
raise ApiException(status=0, reason=msg)

  1. That means urllib3.exceptions.MaxRetryError is exposed directly to the caller (even though the use of urllib3 is an implementation detail).
  2. The bypassed code discards the original exception which means that the caller must parse the ApiException.reason string to figure out what happened. In a way, this makes 1 preferable.

Activity

  1. tucked commented on Mar 27, 2019

    @tucked
    MemberAuthor

    Also,

    urllib3 does not have backward-compatibility guarantees on minor releases

    So, pinning urllib3 to a compatible patch release (e.g. urllib3 ~= 1.15.1) is probably advisable.

  2. added
    Bug_SDKBugs related to SDK and surrounding scripts
    PackagingTo Track the bug that are release mechanics and packaging specific
    on Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug_SDKBugs related to SDK and surrounding scriptsPackagingTo Track the bug that are release mechanics and packaging specific

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions