Skip to content

check_msg_error

faststream.confluent.client.check_msg_error #

check_msg_error(msg)

Checks for errors in the consumed message.

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

    return msg