Add settings to handle errors on connection

Usefull for me :)

Maybe for others too ?