public function send(Request $request) { try { return $request->send()->json(); } catch (GuzzleHttpException $ex) { throw SiftHttpException::fromGuzzleException($ex); } }
public function testCreateHttpException() { $wrapped = new \Guzzle\Http\Exception\CurlException('derp'); $exception = \Sift\Exception\HttpException::fromGuzzleException($wrapped); $this->assertTrue($exception instanceof \Sift\Exception\HttpException); }