Handle NoSuchElementException in ProviderAPI.