From 28a64cd56c7e20a655917d680f52e90b520f55a7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 4 Nov 2020 11:33:14 +0000 Subject: [PATCH] Log when saving profile We had a bug report with this failing but there's nothing useful because nothing is logged. --- src/components/views/settings/ProfileSettings.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/views/settings/ProfileSettings.js b/src/components/views/settings/ProfileSettings.js index 92851ccaa0..c11a2e3a5e 100644 --- a/src/components/views/settings/ProfileSettings.js +++ b/src/components/views/settings/ProfileSettings.js @@ -84,6 +84,9 @@ export default class ProfileSettings extends React.Component { } if (this.state.avatarFile) { + console.log( + `Uploading new avatar, ${this.state.avatarFile.name} of type ${this.state.avatarFile.type},` + + ` (${this.state.avatarFile.size}) bytes`); const uri = await client.uploadContent(this.state.avatarFile); await client.setAvatarUrl(uri); newState.avatarUrl = client.mxcUrlToHttp(uri, 96, 96, 'crop', false); @@ -93,6 +96,7 @@ export default class ProfileSettings extends React.Component { await client.setAvatarUrl(""); // use empty string as Synapse 500s on undefined } } catch (err) { + console.log("Failed to save profile", err); Modal.createTrackedDialog('Failed to save profile', '', ErrorDialog, { title: _t("Failed to save your profile"), description: ((err && err.message) ? err.message : _t("The operation could not be completed")),