- if (!plugin) return res.sendStatus(HttpStatusCode.NOT_FOUND_404)
- if (withVersion && plugin.version !== req.params.pluginVersion) return res.sendStatus(HttpStatusCode.NOT_FOUND_404)
+ if (!plugin) {
+ return res.fail({
+ status: HttpStatusCode.NOT_FOUND_404,
+ message: 'No plugin found named ' + npmName
+ })
+ }
+ if (withVersion && plugin.version !== req.params.pluginVersion) {
+ return res.fail({
+ status: HttpStatusCode.NOT_FOUND_404,
+ message: 'No plugin found named ' + npmName + ' with version ' + req.params.pluginVersion
+ })
+ }