Refactor errors around the app (#7306)

* Refactor errors around the app

* Fix recursive function

* Fix tests
This commit is contained in:
Daniel Espino García
2023-05-03 13:08:55 +02:00
committed by GitHub
parent e06f85d408
commit 86658edc30
82 changed files with 1079 additions and 1959 deletions

View File

@@ -19,6 +19,7 @@ import {useServerUrl} from '@context/server';
import DraftUploadManager from '@managers/draft_upload_manager';
import * as DraftUtils from '@utils/draft';
import {isReactionMatch} from '@utils/emoji/helpers';
import {getFullErrorMessage} from '@utils/errors';
import {preventDoubleTap} from '@utils/tap';
import {confirmOutOfOfficeDisabled} from '@utils/user';
@@ -197,7 +198,7 @@ export default function SendHandler({
setSendingMessage(false);
if (error) {
const errorMessage = typeof (error) === 'string' ? error : error.message;
const errorMessage = getFullErrorMessage(error);
DraftUtils.alertSlashCommandFailed(intl, errorMessage);
return;
}