Skip to content

Handling of struct errors doesn't print the specific error message #1318

Closed
@jeffwidman

Description

@jeffwidman

When a struct.error is thrown during _pack() or _unpack(), we catch and re-raise as a ValueError: https://github.com/dpkp/kafka-python/blob/master/kafka/protocol/types.py#L11-L12

However, we're shadowing the word error so we lose a handle on the specific exception and cannot print the specific error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions