diff --git a/php/class-terminus-command.php b/php/class-terminus-command.php index 2ca70b7d6..7c220ad5e 100755 --- a/php/class-terminus-command.php +++ b/php/class-terminus-command.php @@ -156,9 +156,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() ); } }