import struct


def find_coordinator_error(error):
    """
    Encode an error'd out FindCoordinatorResponse v0.

    :param error: Kafka errno
    """
    return b"".join([  # FindCoordinator Response v0
        struct.pack('>h', error),         # Error Code
        struct.pack('>i', -1),            # Coordinator id
        struct.pack('>h', 0),             # The Coordinator host
        struct.pack('>i', 0),             # The Coordinator port
    ])