Browse Source
Log the body of the request when the first step of a login fails
master
Matheus Fernandes
8 years ago
No known key found for this signature in database
GPG Key ID: DD07CA4EA7B65C4F
1 changed files with
3 additions and
2 deletions
-
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 |
|
|
|
} |
|
|
|