|
|
|
@ -60,6 +60,8 @@ function validateHomeserverUrl(homeserverUrl) {
|
|
|
|
|
throwLookupError("homeserver returned invalid JSON, maybe it is not a Matrix server?");
|
|
|
|
|
}).catch(ValidationError, (_error) => {
|
|
|
|
|
throwLookupError("homeserver returned an invalid version response, maybe it is not a Matrix server?");
|
|
|
|
|
}).catch({ code: "ENOTFOUND" }, () => {
|
|
|
|
|
throwLookupError("hostname of homeserver does not exist");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -150,6 +152,8 @@ function attemptWellKnown(host) {
|
|
|
|
|
}
|
|
|
|
|
}).catch(getJson.ParsingFailed, (_error) => {
|
|
|
|
|
throwLookupError("host returned invalid JSON");
|
|
|
|
|
}).catch({ code: "ENOTFOUND" }, () => {
|
|
|
|
|
throwLookupError("hostname does not exist");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|