added server error handling related to connections