Added additional error codes into logic which covers server connection termination