Error handler issue

the process was killing the app when an error happened during
connection process