<?php

declare(strict_types=1);

namespace App\Framework\MachineLearning\ModelManagement\Exceptions;

use App\Framework\Exception\FrameworkException;
use App\Framework\Exception\Core\EntityErrorCode;

/**
 * Model Not Found Exception
 *
 * Thrown when attempting to access a model that doesn't exist in the registry.
 */
final class ModelNotFoundException extends FrameworkException
{
    public static function forModel(string $modelId): self
    {
        return self::create(
            EntityErrorCode::ENTITY_NOT_FOUND,
            "Model '{$modelId}' not found in registry"
        )->withData([
            'model_id' => $modelId,
            'recovery_action' => 'Register model first or check model ID spelling'
        ]);
    }
}
