package cd.casic.plugin.exception;

import org.springframework.web.server.ServerWebInputException;

import java.net.URI;

/**
 * @description: TODO
 * @author: mianbin
 * @date: 2025/5/14 14:45
 * @version: 1.0
 */
public class PluginAlreadyExistsException extends ServerWebInputException {

    public static final String PLUGIN_ALREADY_EXISTS_TYPE =
            "https://127.0.0.1:8090/probs/plugin-alreay-exists";

    public PluginAlreadyExistsException(String pluginName) {
        super("Plugin already exists.", null, null, null, new Object[] {pluginName});
        setType(URI.create(PLUGIN_ALREADY_EXISTS_TYPE));
        getBody().setProperty("pluginName", pluginName);
    }
}
