refactor ProviderUnavailableException handling