[CB-4724] fixed UriFormatException

fixed UriFormatException & InvalidOperationException