Turn assertion into ProtocolError in channel.open.