handler get_socket errors a bit better