if (param.onError) {
                            logger.debug("Generating handler plugin on error (onError)");
                            plugin = {name: 'generatedHandlerError', fn: param.onError};
                            plugin.scope = param.scope || plugin;
                            ret.push(new HandlerErrorPlugin(plugin));