Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 5ebcffc

Browse files
marwahahazkat
authored andcommitted
fix(error): improve User not found publish message (#167)
1 parent 519401a commit 5ebcffc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/request.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ function requestDone (method, where, cb) {
298298
)
299299
} else if (name && parsed.error === 'not_found') {
300300
er = makeError('404 Not Found: ' + name, name, response.statusCode)
301+
} else if (name && parsed.error === 'User not found') {
302+
er = makeError('User not found. Check `npm whoami` and make sure you have a NPM account.', name, response.statusCode)
301303
} else {
302304
er = makeError(
303305
parsed.error + ' ' + (parsed.reason || '') + ': ' + (name || w),

0 commit comments

Comments
 (0)