Skip to content

Commit

Permalink
Return full guzzle error response
Browse files Browse the repository at this point in the history
  • Loading branch information
raitisg committed Sep 29, 2017
1 parent 71aaade commit de45892
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TogglApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ private function GET($endpoint, $body = array(), $query = array())
} catch (ClientException $e) {
return (object) [
'success' => false,
'message' => $e->getMessage(),
'message' => $e->getResponse()->getBody()->getContents(),
];
}
}
Expand All @@ -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(),
];
}
}
Expand All @@ -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(),
];
}
}
Expand All @@ -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(),
];
}
}
Expand Down

0 comments on commit de45892

Please sign in to comment.