def METHOD_NAME(self) -> StatusResponse:
    """Checks connection to Rocket Chat API by sending a ping request.
    Returns StatusResponse indicating whether or not the handler is connected.
    """
    response = StatusResponse(False)
    try:
        self.connect()
        response.success = True
    except Exception as e:
        log.logger.error(f'Error connecting to Rocket Chat API: {e}!')
        response.error_message = e
    if response.success is False:
        self.is_connected = False
    return response