Skip to content

Commit

Permalink
Merge pull request #9 from raitisg/full_exception
Browse files Browse the repository at this point in the history
Return full guzzle error response
  • Loading branch information
Mat-Gr authored Oct 2, 2017
2 parents 661bbe5 + de45892 commit d9327e2
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, $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 d9327e2

Please sign in to comment.