summaryrefslogtreecommitdiffstats
path: root/src/ServerErrorException.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/ServerErrorException.php')
-rw-r--r--src/ServerErrorException.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ServerErrorException.php b/src/ServerErrorException.php
new file mode 100644
index 0000000..731b23b
--- /dev/null
+++ b/src/ServerErrorException.php
@@ -0,0 +1,22 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Cepis;
+
+/**
+ * The API answered 5xx on every attempt.
+ */
+final class ServerErrorException extends \RuntimeException implements CepisException
+{
+ /**
+ * @param int $status HTTP status seen on the last attempt.
+ */
+ public function __construct(
+ string $message,
+ public readonly int $status,
+ ?\Throwable $previous = null,
+ ) {
+ parent::__construct($message, 0, $previous);
+ }
+}