Skip to content

check_msg_error

faststream.confluent.helpers.client.check_msg_error #

check_msg_error(msg)

Checks for errors in the consumed message.

Source code in faststream/confluent/helpers/client.py
def check_msg_error(msg: Message | None) -> Message | None:
    """Checks for errors in the consumed message."""
    if msg is None or msg.error():
        return None

    return msg