From 9c3a63b836c4451cc7fb2ab4dad720198c862417 Mon Sep 17 00:00:00 2001 From: mattamon Date: Wed, 23 Oct 2024 09:19:42 +0200 Subject: [PATCH] throw exception if no result is obtained --- src/Processor/Api/PDFreactor.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Processor/Api/PDFreactor.class.php b/src/Processor/Api/PDFreactor.class.php index 88a34ba..9c64659 100644 --- a/src/Processor/Api/PDFreactor.class.php +++ b/src/Processor/Api/PDFreactor.class.php @@ -105,6 +105,9 @@ public function convert($config, & $connectionSettings = null) } } } + if(!$result) { + throw $this->_createServerException('serviceUnavailable', 'PDFreactor Web Service is unavailable.', $result); + } if ($status == 422) { throw $this->_createServerException($errorId, $result->error, $result); } elseif ($status == 400) {