Corrected and improved error detection for provider name lookup