error handling for discovery