Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-1475

Some exception classes do not handle first positional arg being a string message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.1.4
    • None
    • None
    • None
    • 0

    Description

      The CouchbaseException class accepts all optional positional arguments, but the first arg, if it exists, is expected to be a pycbc_core exception type (this is an artifact of when the bindings were first re-written and should potentially be re-worked in the future). However, there are instances when the SDK raises exceptions when only providing a message as the first positional arg. This causes issues when a user tries to access the str/repr of the exception.

      The SDK should either set the message kwarg or update the _init_ of all exceptions to handle this use-case. This is correctly handled for most of the commonly raised exceptions, but should be applied in all instances.

      Attachments

        Activity

          People

            jared.casey Jared Casey
            jared.casey Jared Casey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty