@@ -69,7 +69,11 @@ public function select($collectionName, array $ids)
6969 try {
7070 $ response = $ this ->client ->request ('GET ' , 'meta/? ' .http_build_query ($ queryParams ));
7171 } catch (ClientException $ e ) {
72- throw new StreamFeedException ($ e ->getResponse ()->getBody ());
72+ $ response = $ e ->getResponse ();
73+ $ msg = $ response ->getBody ();
74+ $ code = $ response ->getStatusCode ();
75+ $ previous = $ e ;
76+ throw new StreamFeedException ($ msg , $ code , $ previous );
7377 }
7478
7579 $ body = $ response ->getBody ()->getContents ();
@@ -90,7 +94,11 @@ public function upsert($collectionName, array $data)
9094 try {
9195 $ response = $ this ->client ->request ('POST ' , 'meta/ ' , $ options );
9296 } catch (ClientException $ e ) {
93- throw new StreamFeedException ($ e ->getResponse ()->getBody ());
97+ $ response = $ e ->getResponse ();
98+ $ msg = $ response ->getBody ();
99+ $ code = $ response ->getStatusCode ();
100+ $ previous = $ e ;
101+ throw new StreamFeedException ($ msg , $ code , $ previous );
94102 }
95103
96104 $ body = $ response ->getBody ()->getContents ();
@@ -112,7 +120,11 @@ public function delete($collectionName, array $ids)
112120 try {
113121 $ response = $ this ->client ->request ('DELETE ' , 'meta/? ' .http_build_query ($ queryParams ));
114122 } catch (ClientException $ e ) {
115- throw new StreamFeedException ($ e ->getResponse ()->getBody ());
123+ $ response = $ e ->getResponse ();
124+ $ msg = $ response ->getBody ();
125+ $ code = $ response ->getStatusCode ();
126+ $ previous = $ e ;
127+ throw new StreamFeedException ($ msg , $ code , $ previous );
116128 }
117129
118130 $ body = $ response ->getBody ()->getContents ();
0 commit comments