Skip to content

Commit 6c9c0a7

Browse files
alexander-schranzezimuel
authored andcommitted
Better exception message for Could not parse URI
1 parent cd09c03 commit 6c9c0a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elasticsearch/ClientBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ private function extractURIParts(string $host): array
691691
$parts = parse_url($host);
692692

693693
if ($parts === false) {
694-
throw new InvalidArgumentException("Could not parse URI");
694+
throw new InvalidArgumentException(sprintf('Could not parse URI: "%s"', $host));
695695
}
696696

697697
if (isset($parts['port']) !== true) {

0 commit comments

Comments
 (0)