package cd.casic.plugin.exception;

import org.springframework.web.server.ServerWebInputException;

import java.net.URI;
import java.util.List;

/**
 * @description: TODO
 * @author: mianbin
 * @date: 2025/5/14 15:23
 * @version: 1.0
 */
public class PluginDependenciesNotEnabledException extends ServerWebInputException {

    public static final URI TYPE =
            URI.create("https://127.0.0.1:8090/probs/plugin-dependencies-not-enabled");

    /**
     * Instantiates a new Plugin dependencies not enabled exception.
     *
     * @param dependencies dependencies that are not enabled
     */
    public PluginDependenciesNotEnabledException(List<String> dependencies) {
        super("Plugin dependencies are not fully enabled, please enable them first.",
                null,
                null,
                null,
                new Object[] {dependencies});
        setType(TYPE);
        getBody().setProperty("dependencies", dependencies);
    }

}

