<?php

declare(strict_types=1);

namespace CpCreation\AltchaBundle\Exception;

final class AltchaServiceRejectedException extends \RuntimeException
{
    public function __construct(
        public readonly AltchaFailureReason $reason,
        public readonly int $statusCode,
        public readonly ?int $retryAfter = null,
    ) {
        parent::__construct(sprintf('The ALTCHA service rejected the request (%s).', $reason->value));
    }
}
