first commit

This commit is contained in:
Alex
2025-07-06 18:52:32 +03:00
commit bcd8a52d06
27 changed files with 1126 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace BushlanovDev\MaxMessengerBot\Exceptions;
use Psr\Http\Message\ResponseInterface;
use RuntimeException;
use Throwable;
class ClientApiException extends RuntimeException
{
public function __construct(
string $message,
public readonly string $errorCode,
public readonly ?ResponseInterface $response = null,
public readonly ?int $httpStatusCode = null,
?Throwable $previous = null,
) {
parent::__construct($message, $httpStatusCode ?? 0, $previous);
}
public function getHttpStatusCode(): ?int
{
return $this->httpStatusCode;
}
}