Log errors when resolving openID tokens in web api.

https://github.com/matrix-org/mjolnir/issues/416.
This commit is contained in:
gnuxie 2022-11-15 17:34:04 +00:00
parent 4d07b1bd76
commit 3cbc49585a

View File

@ -28,6 +28,7 @@ export class Api {
qs: { access_token: accessToken },
}, (err, homeserver_response, body) => {
if (err) {
console.error(`Error resolving openID token from ${this.homeserver}`, err);
reject(null);
}
@ -35,6 +36,7 @@ export class Api {
try {
response = JSON.parse(body);
} catch (e) {
console.error(`Received ill formed response from ${this.homeserver} when resolving an openID token`, e);
reject(null);
return;
}