diff --git a/php/class-terminus-command.php b/php/class-terminus-command.php index 4c6dad64d..842fb5979 100755 --- a/php/class-terminus-command.php +++ b/php/class-terminus-command.php @@ -153,9 +153,14 @@ public static function request($realm, $uuid, $path = FALSE, $method = 'GET', $o ); $cache->put_data($cachekey, $data); return $data; - } catch( Exception $e ) { + } catch( Guzzle\Http\Exception\BadResponseException $e ) { $response = $e->getResponse(); \Terminus::error("%s", $response->getBody(TRUE) ); + } catch( Guzzle\Http\Exception\HttpException $e ) { + $request = $e->getRequest(); + \Terminus::error("Request %s had failed: %s", (string)$request, $e->getMessage() ); + } catch( Exception $e ) { + \Terminus::error("Unrecognised request failure: %s", $e->getMessage() ); } }