Commit e8c17819 authored by yann300's avatar yann300

return error if end point not present

parent 1638a1e1
......@@ -172,7 +172,12 @@ module.exports = class PluginManager {
data.value.push((error, result) => {
response(data.key, data.type, data.id, error, result)
})
pluginAPI[data.key][data.type].apply({}, data.value)
if (pluginAPI[data.key] && pluginAPI[data.key][data.type]) {
pluginAPI[data.key][data.type].apply({}, data.value)
} else {
response(data.key, data.type, data.id, `Endpoint ${data.key}/${data.type} not present`, null)
}
}, false)
}
unregister (desc) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment