diff --git a/lib/outdated.js b/lib/outdated.js index bb4c346f9a654..794197cfc6a69 100644 --- a/lib/outdated.js +++ b/lib/outdated.js @@ -421,7 +421,7 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, opts, cb, type var l = pickManifest(d, 'latest') var m = pickManifest(d, req) } catch (er) { - if (er.code === 'ETARGET') { + if (er.code === 'ETARGET' || er.code === 'E403') { return skip(er) } else { return skip() diff --git a/lib/utils/error-message.js b/lib/utils/error-message.js index 7835a1cdfcfa2..5ddfb37682a2e 100644 --- a/lib/utils/error-message.js +++ b/lib/utils/error-message.js @@ -327,6 +327,18 @@ function errorMessage (er) { detail.push(['notarget', msg.join('\n')]) break + case 'E403': + short.push(['403', er.message]) + msg = [ + 'In most cases, you or one of your dependencies are requesting', + 'a package version that is forbidden by your security policy.' + ] + if (er.parent) { + msg.push("\nIt was specified as a dependency of '" + er.parent + "'\n") + } + detail.push(['403', msg.join('\n')]) + break + case 'ENOTSUP': if (er.required) { short.push(['notsup', er.message])