forked from Ivasoft/mattermost-mobile
Refactor errors around the app (#7306)
* Refactor errors around the app * Fix recursive function * Fix tests
This commit is contained in:
committed by
GitHub
parent
e06f85d408
commit
86658edc30
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user