From 39c1de19fc0de37176634496fe6ef44cfac6e8af Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 12 Aug 2019 15:39:50 +0100 Subject: [PATCH] Throw an exception if trying to do an ID server request with no ID server Will help with https://github.com/vector-im/riot-web/issues/10540 --- src/http-api.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/http-api.js b/src/http-api.js index 7853ea18f..c0f221b59 100644 --- a/src/http-api.js +++ b/src/http-api.js @@ -389,6 +389,10 @@ module.exports.MatrixHttpApi.prototype = { prefix, accessToken, ) { + if (!this.opts.idBaseUrl) { + throw new Error("No ID Server Base URL set"); + } + const fullUri = this.opts.idBaseUrl + prefix + path; if (callback !== undefined && !utils.isFunction(callback)) {