<?php

declare(strict_types=1);

namespace ApiModel\Shared\Exceptions;

final class ValidationException extends ApiException
{
    /** @param array<string, mixed> $details */
    public function __construct(string $message, array $details = [])
    {
        parent::__construct(
            $message,
            422,
            'VALIDATION_ERROR',
            $details === [] ? null : $details,
        );
    }
}
