Files
mattermost-mobile/app/utils/errors.ts
Daniel Espino García b1e4403768 Fix several issues around team join (#6863)
* Fix several issues around team join

* Open in modal and fix channel list

* Add joining states and fix issues

* i18n-extract

* add specific message for group related failures on joining teams

* Address feedback

* Address feedback

* Use error from server response
2022-12-23 14:43:59 +02:00

12 lines
376 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
export function isServerError(obj: unknown): obj is {server_error_id: string; message?: string} {
return (
typeof obj === 'object' &&
obj !== null &&
'server_error_id' in obj &&
typeof obj.server_error_id === 'string'
);
}