Merge pull request #3863 from matrix-org/dbkr/catch_exception_checkterms

Catch exception in checkTerms if no ID server
This commit is contained in:
David Baker 2020-01-17 16:55:41 +00:00 committed by GitHub
commit 158bf3d1fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,8 +160,8 @@ export default class GeneralUserSettingsTab extends React.Component {
// for free. So we might as well use that for our own purposes.
const idServerUrl = MatrixClientPeg.get().getIdentityServerUrl();
const authClient = new IdentityAuthClient();
const idAccessToken = await authClient.getAccessToken({ check: false });
try {
const idAccessToken = await authClient.getAccessToken({ check: false });
await startTermsFlow([new Service(
SERVICE_TYPES.IS,
idServerUrl,