show url and HTTP method in exception
[phorkie.git] / src / phorkie / Database / Adapter / Elasticsearch / HTTPRequest.php
index 4cc02d6fe6581746e1a62124fd038d46f17af09e..24487bcd554d21035154e383f4d369a68987e67b 100644 (file)
@@ -22,9 +22,11 @@ class Database_Adapter_Elasticsearch_HTTPRequest extends \HTTP_Request2
         } else {
             $error = $res->getBody();
         }
+
         throw new Exception(
-            'Error in elasticsearch communication'
-            . '(status code ' . $res->getStatus() . '): '
+            'Error in elasticsearch communication at '
+            . $this->getMethod() . ' ' . (string) $this->getUrl()
+            . ' (status code ' . $res->getStatus() . '): '
             . $error
         );
     }