1 import { getApiError } from '@proton/shared/lib/api/helpers/apiErrorHelper'
3 export function getErrorString(error: any): string | undefined {
4 if ('message' in error && error.message && typeof error.message === 'string') {
6 } else if (typeof error === 'string') {
9 const apiError = getApiError(error)
10 if (apiError.message) {
11 return apiError.message