Issue 2727 -> Show proper error message when connecting to a server

Fixed the wonky indentations.