<?php

namespace Khatfield\Tautulli\Exceptions;

class TautulliApiException extends TautulliException
{
    protected string $apiMessage;

    public function __construct(string $apiMessage, int $code = 0, ?\Throwable $previous = null)
    {
        $this->apiMessage = $apiMessage;

        parent::__construct("Tautulli API error: {$apiMessage}", $code, $previous);
    }

    public function getApiMessage(): string
    {
        return $this->apiMessage;
    }
}
