Replace console.error with logger.error
Related https://github.com/vector-im/element-web/issues/18425
This commit is contained in:
parent
9c594a8a96
commit
5e73a212f4
124 changed files with 417 additions and 250 deletions
|
@ -19,6 +19,8 @@ import { SERVICE_TYPES } from 'matrix-js-sdk/src/service-types';
|
|||
import SdkConfig from '../SdkConfig';
|
||||
import { MatrixClientPeg } from '../MatrixClientPeg';
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
export function getDefaultIdentityServerUrl(): string {
|
||||
return SdkConfig.get()['validated_server_config']['isUrl'];
|
||||
}
|
||||
|
@ -36,7 +38,7 @@ export async function doesIdentityServerHaveTerms(fullUrl: string): Promise<bool
|
|||
try {
|
||||
terms = await MatrixClientPeg.get().getTerms(SERVICE_TYPES.IS, fullUrl);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
logger.error(e);
|
||||
if (e.cors === "rejected" || e.httpStatus === 404) {
|
||||
terms = null;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue