Skip to content

Expose error details in "UnexpectedException" in Python library #156

@charlie-zhang109

Description

@charlie-zhang109

General information

  • SDK/Library version:4.28.0
  • Environment: Production

Issue description

When our backend tried to create a customer on BT side, we got the following UnexpectedError without a detailed message.

raise UnexpectedError("Unexpected HTTP_RESPONSE " + str(status))
braintree.exceptions.unexpected_error.UnexpectedError: Unexpected HTTP_RESPONSE 400

From this BT doc, looks like the client library needs to handle it.

Also Java library had this similar issue and it got fixed.

It would be helpful if that error was bubbled up to the exception, or generated a more specific exception like the Java library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions