update to PHP-8.1
[m6w6/seekat] / lib / Exception / RequestException.php
index a9da6d6c731bc8ed60d8ab011e04d66feb472a19..06bc96032b5b37b6bb3830fd7847c46bcabe8f6f 100644 (file)
@@ -2,15 +2,13 @@
 
 namespace seekat\Exception;
 
-use Exception as BaseException;
-use http\ {
-       Client\Response,
-       Header
-};
+use http\{Client\Response, Header};
 use seekat\Exception;
 
-class RequestException extends BaseException implements Exception
-{
+/**
+ * @code-coverage-ignore
+ */
+class RequestException extends \Exception implements Exception {
        /**
         * JSON errors
         * @var array
@@ -58,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