diff --git a/src/SimpleSAML/Utils/HTTP.php b/src/SimpleSAML/Utils/HTTP.php
index 36be7383de552f2b52ae386f9fd2741f2ede5a7f..d69665d31fab9d887f79733a760c38093847bf05 100644
--- a/src/SimpleSAML/Utils/HTTP.php
+++ b/src/SimpleSAML/Utils/HTTP.php
@@ -218,7 +218,7 @@ class HTTP
         }
 
         if (!$this->isValidURL($url)) {
-            throw new Error\Exception('Invalid destination URL.');
+            throw new Error\Exception('Invalid destination URL: ' . $url);
         }
 
         if (!empty($parameters)) {
@@ -1176,7 +1176,7 @@ class HTTP
     public function submitPOSTData(string $destination, array $data): void
     {
         if (!$this->isValidURL($destination)) {
-            throw new Error\Exception('Invalid destination URL.');
+            throw new Error\Exception('Invalid destination URL: ' . $destination);
         }
 
         $config = Configuration::getInstance();