Guard against URI.parse errors