Skip to content

Invalid use of types in error messages in definition.py #31

Closed
@hdiode-florian

Description

@hdiode-florian

Describe the bug
In several places https://github.com/apache/pulsar/blob/master/pulsar-client-cpp/python/pulsar/schema/definition.py uses incorrect type (name) to string conversions when exceptions are raised, for example:
https://github.com/apache/pulsar/blob/66e8206f129a7ea303099af1317f78652240f985/pulsar-client-cpp/python/pulsar/schema/definition.py#L29

To Reproduce

from pulsar.schema import Array, Integer
f = Array(Integer)
TypeError: can only concatenate str (not "type") to str

Expected behavior

Exception: Argument Integer is not a Record or a Field

Additional context
The same mistake was made in several places in that file.

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