Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit e092929

Browse files
authored
Merge pull request #5394 from matrix-org/dbkr/log_profile_save_error_2
Log when saving profile
2 parents 05d4193 + 28a64cd commit e092929

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/components/views/settings/ProfileSettings.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ export default class ProfileSettings extends React.Component {
8484
}
8585

8686
if (this.state.avatarFile) {
87+
console.log(
88+
`Uploading new avatar, ${this.state.avatarFile.name} of type ${this.state.avatarFile.type},` +
89+
` (${this.state.avatarFile.size}) bytes`);
8790
const uri = await client.uploadContent(this.state.avatarFile);
8891
await client.setAvatarUrl(uri);
8992
newState.avatarUrl = client.mxcUrlToHttp(uri, 96, 96, 'crop', false);
@@ -93,6 +96,7 @@ export default class ProfileSettings extends React.Component {
9396
await client.setAvatarUrl(""); // use empty string as Synapse 500s on undefined
9497
}
9598
} catch (err) {
99+
console.log("Failed to save profile", err);
96100
Modal.createTrackedDialog('Failed to save profile', '', ErrorDialog, {
97101
title: _t("Failed to save your profile"),
98102
description: ((err && err.message) ? err.message : _t("The operation could not be completed")),

0 commit comments

Comments
 (0)