From e3c1b54c9978b142d52bc2a51c416f39d69bc49d Mon Sep 17 00:00:00 2001 From: Diadal Date: Tue, 10 Jul 2018 12:34:03 +0100 Subject: [PATCH] error 500 on failed connection user can catch the error rather than return error 500 if your bitcoin server went down --- src/Http/Driver/CurlDriver.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/Driver/CurlDriver.php b/src/Http/Driver/CurlDriver.php index 0380c07..aea0f3e 100644 --- a/src/Http/Driver/CurlDriver.php +++ b/src/Http/Driver/CurlDriver.php @@ -73,7 +73,8 @@ public function execute(RequestInterface $request) $error = curl_error(self::$ch); if (!empty($error)) { - throw new \Exception($error); + // user can catch the error rather than return error 500 if your bitcoin server went down + return new \Exception($error); } $response = new Response();