[tests] Add log for error response (#4601)

This commit is contained in:
Steven
2020-06-08 20:51:31 -04:00
committed by GitHub
parent 7c96f9f9a5
commit f7c47975e3

View File

@@ -186,7 +186,10 @@ async function fetchTokenWithRetry(retries = 5) {
},
});
if (!res.ok) {
throw new Error(`Unexpected status from registration: ${res.status}`);
const text = await res.text();
throw new Error(
`Unexpected status (${res.status}) from registration: ${text}`
);
}
const data = await res.json();
if (!data) {