Skip to content

Commit d62d253

Browse files
lgaticaqgr2m
authored andcommitted
fix(npm): fix capture otp error
1 parent 2bac887 commit d62d253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/npm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function getNpmToken({npm, options}) {
3232
} catch (err) {
3333
const [error, , , response] = err;
3434

35-
if (error.code === 'E401' && response.headers['www-authenticate'] === 'OTP') {
35+
if ((error.code === 'E401' || error.code === 'EOTP') && response.headers['www-authenticate'] === 'OTP') {
3636
await askForOTP(uri, body, npm);
3737
({token} = npm);
3838
} else if (error.code === 'E409') {

0 commit comments

Comments
 (0)