diff --git a/src/TogglApi.php b/src/TogglApi.php index cb13cc0..ebf8b17 100644 --- a/src/TogglApi.php +++ b/src/TogglApi.php @@ -927,7 +927,7 @@ private function GET($endpoint, $query = array()) } catch (ClientException $e) { return (object) [ 'success' => false, - 'message' => $e->getMessage(), + 'message' => $e->getResponse()->getBody()->getContents(), ]; } } @@ -950,7 +950,7 @@ private function POST($endpoint, $body = array(), $query = array()) } catch (ClientException $e) { return (object) [ 'success' => false, - 'message' => $e->getMessage(), + 'message' => $e->getResponse()->getBody()->getContents(), ]; } } @@ -973,7 +973,7 @@ private function PUT($endpoint, $body = array(), $query = array()) } catch (ClientException $e) { return (object) [ 'success' => false, - 'message' => $e->getMessage(), + 'message' => $e->getResponse()->getBody()->getContents(), ]; } } @@ -996,7 +996,7 @@ private function DELETE($endpoint, $body = array(), $query = array()) } catch (ClientException $e) { return (object) [ 'success' => false, - 'message' => $e->getMessage(), + 'message' => $e->getResponse()->getBody()->getContents(), ]; } }