Check if connection is local for error handling