update to PHP-8.1
[m6w6/seekat] / lib / Exception / RequestException.php
index 7f91535b7d59f3c8cf69af8d26fac31ac4954077..06bc96032b5b37b6bb3830fd7847c46bcabe8f6f 100644 (file)
@@ -2,18 +2,13 @@
 
 namespace seekat\Exception;
 
-use Exception as BaseException;
-use http\ {
-       Client\Response,
-       Header
-};
+use http\{Client\Response, Header};
 use seekat\Exception;
 
 /**
  * @code-coverage-ignore
  */
-class RequestException extends BaseException implements Exception
-{
+class RequestException extends \Exception implements Exception {
        /**
         * JSON errors
         * @var array
@@ -61,6 +56,13 @@ class RequestException extends BaseException implements Exception
                return $this->errors;
        }
 
+       /**
+        * @return Response
+        */
+       function getResponse() : Response {
+               return $this->response;
+       }
+
        /**
         * Combine any errors into a single string
         * @staticvar array $reasons