While automating SAP with uipath if the connection is lost in middle and the screens freeze, how do we handle it in UiPath

while automating SAP with Uipath if the connection is lost in middle and the screens freeze, how do we handle it in uipath