Some exception classes do not handle first positional arg being a string message
Description
Environment
None
Gerrit Reviews
None
Release Notes Description
None
Activity
Show:
Jared Casey April 28, 2023 at 3:57 AM
Exceptions updated to allow instantiation with a single positional message str argument and updated to have appropriate _str_ and _repr_ methods.
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Details
Assignee
Jared Casey
Jared CaseyReporter
Jared Casey
Jared CaseyStory Points
0
Fix versions
Priority
Instabug
Open Instabug
PagerDuty
PagerDuty Incident
PagerDuty

PagerDuty Incident
Sentry
Linked Issues
Sentry
Linked Issues
Zendesk Support
Linked Tickets
Zendesk Support

Linked Tickets
Created April 14, 2023 at 2:21 AM
Updated April 28, 2023 at 3:57 AM
Resolved April 28, 2023 at 3:57 AM
Instabug
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.