catch the exception for URI connection instead of raise