forked from Ivasoft/mattermost-mobile
* 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
12 lines
376 B
TypeScript
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'
|
|
);
|
|
}
|