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
|
@ -29,6 +29,8 @@ import RoomPublishSetting from "./RoomPublishSetting";
|
|||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import RoomAliasField from "../elements/RoomAliasField";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
interface IEditableAliasesListProps {
|
||||
domain?: string;
|
||||
}
|
||||
|
@ -171,7 +173,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
|
||||
MatrixClientPeg.get().sendStateEvent(this.props.roomId, "m.room.canonical_alias",
|
||||
eventContent, "").catch((err) => {
|
||||
console.error(err);
|
||||
logger.error(err);
|
||||
Modal.createTrackedDialog('Error updating main address', '', ErrorDialog, {
|
||||
title: _t("Error updating main address"),
|
||||
description: _t(
|
||||
|
@ -204,7 +206,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
|
||||
MatrixClientPeg.get().sendStateEvent(this.props.roomId, "m.room.canonical_alias",
|
||||
eventContent, "").catch((err) => {
|
||||
console.error(err);
|
||||
logger.error(err);
|
||||
Modal.createTrackedDialog('Error updating alternative addresses', '', ErrorDialog, {
|
||||
title: _t("Error updating main address"),
|
||||
description: _t(
|
||||
|
@ -236,7 +238,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
this.changeCanonicalAlias(alias);
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.error(err);
|
||||
logger.error(err);
|
||||
Modal.createTrackedDialog('Error creating address', '', ErrorDialog, {
|
||||
title: _t("Error creating address"),
|
||||
description: _t(
|
||||
|
@ -259,7 +261,7 @@ export default class AliasSettings extends React.Component<IProps, IState> {
|
|||
this.changeCanonicalAlias(null);
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.error(err);
|
||||
logger.error(err);
|
||||
let description;
|
||||
if (err.errcode === "M_FORBIDDEN") {
|
||||
description = _t("You don't have permission to delete the address.");
|
||||
|
|
|
@ -24,6 +24,8 @@ import ErrorDialog from "../dialogs/ErrorDialog";
|
|||
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
const GROUP_ID_REGEX = /\+\S+:\S+/;
|
||||
|
||||
@replaceableComponent("views.room_settings.RelatedGroupSettings")
|
||||
|
@ -53,7 +55,7 @@ export default class RelatedGroupSettings extends React.Component {
|
|||
this.context.sendStateEvent(this.props.roomId, 'm.room.related_groups', {
|
||||
groups: newGroupsList,
|
||||
}, '').catch((err) => {
|
||||
console.error(err);
|
||||
logger.error(err);
|
||||
Modal.createTrackedDialog('Error updating flair', '', ErrorDialog, {
|
||||
title: _t("Error updating flair"),
|
||||
description: _t(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue