<?php

namespace App\Services\LinkedIn;

use RuntimeException;
use Throwable;

class LinkedInException extends RuntimeException
{
    /** @param array<string, mixed> $diagnostics */
    public function __construct(
        string $message = '',
        int $code = 0,
        ?Throwable $previous = null,
        private readonly array $diagnostics = [],
    ) {
        parent::__construct($message, $code, $previous);
    }

    /** @return array<string, mixed> */
    public function diagnostics(): array
    {
        return $this->diagnostics;
    }
}
