mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
add additional log statement
This commit is contained in:
parent
f1b6244889
commit
842a41c8ab
|
@ -90,9 +90,14 @@ async function getUserInfo(token: string, serverUri: vscode.Uri, logger: Log): P
|
|||
}
|
||||
|
||||
if (result.ok) {
|
||||
const json = await result.json();
|
||||
logger.info('Got account info!');
|
||||
return { id: json.id, accountName: json.login };
|
||||
try {
|
||||
const json = await result.json();
|
||||
logger.info('Got account info!');
|
||||
return { id: json.id, accountName: json.login };
|
||||
} catch (e) {
|
||||
logger.error(`Unexpected error parsing response from GitHub: ${e.message ?? e}`);
|
||||
throw e;
|
||||
}
|
||||
} else {
|
||||
// either display the response message or the http status text
|
||||
let errorMessage = result.statusText;
|
||||
|
|
Loading…
Reference in a new issue