This function should return `(*DiscoverClient, error)`, we don't want to call `exit` from library code.