diff --git a/src/Request.php b/src/Request.php index 9c0d55d..95ccbb2 100644 --- a/src/Request.php +++ b/src/Request.php @@ -140,7 +140,10 @@ protected function exec(){ //可以记录日志 try { - return json_decode($this->send(),true); + $temp=json_decode($this->send(),true); + if(isset($temp['status']) && $temp['status']=='error') throw new Exception(json_encode($temp)); + + return $temp; }catch (RequestException $e){ if(method_exists($e->getResponse(),'getBody')){ $contents=$e->getResponse()->getBody()->getContents();