diff --git a/changes.txt b/changes.txt index 7d375fb867..bfc669cdcd 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,8 @@ CHANGES +2014-10-05 +- Improve exception handling in Type::getDocument() #693 + 2014-10-04 - Release v1.3.4.0 - Update to elasticsearch 1.3.4 #691 diff --git a/lib/Elastica/Type.php b/lib/Elastica/Type.php index 1ed952db87..a1df44de78 100644 --- a/lib/Elastica/Type.php +++ b/lib/Elastica/Type.php @@ -228,7 +228,7 @@ public function getDocument($id, $options = array()) $response = $this->request($path, Request::GET, array(), $options); $result = $response->getData(); } catch (ResponseException $e) { - throw new NotFoundException('doc id ' . $id . ' not found'); + throw new NotFoundException('unable to retrieve doc id ' . $id. ': '.$e->getMessage(), $e->getCode(), $e); } $info = $response->getTransferInfo();