Update index.js

Call PluginError using new