Make slash command errors translatable but also work in rageshakes (#7377)

See https://github.com/matrix-org/matrix-react-sdk/pull/7372#discussion_r769556546

We want the error to be translated for the user but not in our rageshake logs.

Also updates some error messages to give more info.
This commit is contained in:
Eric Eastwood 2022-01-11 12:25:28 -06:00 committed by GitHub
parent 53a72dafa9
commit 038a6bc204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 91 additions and 40 deletions

View file

@ -378,6 +378,9 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
let errText;
if (typeof error === 'string') {
errText = error;
} else if (error.translatedMessage) {
// Check for translatable errors (newTranslatableError)
errText = error.translatedMessage;
} else if (error.message) {
errText = error.message;
} else {