Browse Source

Log the body of the request when the first step of a login fails

master
Matheus Fernandes 8 years ago
parent
commit
04f457550e
No known key found for this signature in database GPG Key ID: DD07CA4EA7B65C4F
  1. 5
      lib/login.js

5
lib/login.js

@ -27,10 +27,11 @@ async function getVerificationData(url, email) {
body: data
})
const body = await res.json()
if (res.status !== 200) {
throw new Error(`Verification error: ${res.status}${body}`)
throw new Error(
`Verification error: ${res.status}${JSON.stringify(body)}`
)
}
return body
}

Loading…
Cancel
Save