mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-08-27 03:37:04 +00:00
first commit
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user