From 3cbc49585af580c6938f8a3bf05257cb71a5bc26 Mon Sep 17 00:00:00 2001 From: gnuxie Date: Tue, 15 Nov 2022 17:34:04 +0000 Subject: [PATCH] Log errors when resolving openID tokens in web api. https://github.com/matrix-org/mjolnir/issues/416. --- src/appservice/Api.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/appservice/Api.ts b/src/appservice/Api.ts index a279116..8f85f00 100644 --- a/src/appservice/Api.ts +++ b/src/appservice/Api.ts @@ -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; }