You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Move exception throw into _chooseFlow
This commit is contained in:
@@ -334,15 +334,6 @@ InteractiveAuth.prototype = {
|
||||
*/
|
||||
_chooseStage: function() {
|
||||
const flow = this._chooseFlow();
|
||||
if (!flow) {
|
||||
// XXX: This happens to be the only way this can fail right now, but
|
||||
// in general this is not really going to be an accurate error message.
|
||||
// Ideally this would signal what inputs could be removed such that a matching
|
||||
// flow could be found.
|
||||
throw new Error(
|
||||
"This server does not support registration with a phone number",
|
||||
);
|
||||
}
|
||||
console.log("Active flow => %s", JSON.stringify(flow));
|
||||
const nextStage = this._firstUncompletedStage(flow);
|
||||
console.log("Next stage: %s", nextStage);
|
||||
@@ -388,7 +379,13 @@ InteractiveAuth.prototype = {
|
||||
return flow;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
// XXX: This happens to be the only way this can fail right now, but
|
||||
// in general this is not really going to be an accurate error message.
|
||||
// Ideally this would signal what inputs could be removed such that a matching
|
||||
// flow could be found.
|
||||
throw new Error(
|
||||
"This server does not support registration with a phone number",
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user