Connection failure raises login dialog

Jul 25, 2016 at 1:21 PM
Error: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation.

I'm sure that this is raising the login or auth request while running from a batch which is executing the package deployed to SSIS catalog.

Is there any way to catch this earlier to log it better or test connection via oauth prior to launching GA request?