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:24
 * @version: 1.0
 */
public class PluginDependentsNotDisabledException extends ServerWebInputException {

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

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

