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:
parent
53a72dafa9
commit
038a6bc204
5 changed files with 91 additions and 40 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue