From 1773cfc817b9974c34afa5c66fe37b954ee81d13 Mon Sep 17 00:00:00 2001 From: Matheus Fernandes Date: Tue, 2 May 2017 14:04:08 -0700 Subject: [PATCH] Log more info when `--login` fails --- lib/login.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/login.js b/lib/login.js index a7e74cc..b1719b1 100644 --- a/lib/login.js +++ b/lib/login.js @@ -27,11 +27,11 @@ async function getVerificationData(url, email) { body: data }) - if (res.status !== 200) { - throw new Error('Verification error') - } const body = await res.json() + if (res.status !== 200) { + throw new Error(`Verification error: ${res.status} – ${body}`) + } return body }