<?php

declare(strict_types=1);

namespace App\Framework\Notification\Channels\WhatsApp;

/**
 * WhatsApp API exception
 *
 * Thrown when WhatsApp Business API returns an error
 */
final class WhatsAppApiException extends \RuntimeException
{
    public function __construct(
        string $message,
        int $httpStatusCode = 0,
        ?\Throwable $previous = null
    ) {
        parent::__construct($message, $httpStatusCode, $previous);
    }

    public function getHttpStatusCode(): int
    {
        return $this->getCode();
    }
}
