Skip to content

Commit 2cbe57a

Browse files
authored
Merge pull request Expensify#67190 from callstack-internal/pac-guerreiro/fix/unexpected-error-submitting-this-expense
Unexpected error submitting this expense error during expense submit
2 parents 2c04f0d + 3e74418 commit 2cbe57a

13 files changed

Lines changed: 31 additions & 5 deletions

File tree

src/components/TestDrive/Modal/EmployeeTestDriveModal.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
} from '@libs/actions/IOU';
2020
import {verifyTestDriveRecipient} from '@libs/actions/Onboarding';
2121
import setTestReceipt from '@libs/actions/setTestReceipt';
22+
import type AccountExistsError from '@libs/Errors/AccountExistsError';
2223
import Navigation from '@libs/Navigation/Navigation';
2324
import type {PlatformStackRouteProp} from '@libs/Navigation/PlatformStackNavigation/types';
2425
import type {TestDriveModalNavigatorParamList} from '@libs/Navigation/types';
@@ -93,13 +94,13 @@ function EmployeeTestDriveModal() {
9394
},
9495
() => {
9596
setIsLoading(false);
96-
setFormError(translate('testDrive.modal.employee.error'));
97+
setFormError(translate('common.genericErrorMessage'));
9798
},
9899
);
99100
})
100-
.catch(() => {
101+
.catch((e: AccountExistsError) => {
101102
setIsLoading(false);
102-
setFormError(translate('testDrive.modal.employee.error'));
103+
setFormError(e.translationKey ? translate(e.translationKey) : 'common.genericErrorMessage');
103104
});
104105
};
105106

src/languages/de.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ const translations = {
628628
getTheApp: 'Hole dir die App',
629629
scanReceiptsOnTheGo: 'Scannen Sie Belege von Ihrem Telefon aus',
630630
headsUp: 'Achtung!',
631+
unstableInternetConnection: 'Instabile Internetverbindung. Bitte überprüfe dein Netzwerk und versuche es erneut.',
631632
},
632633
supportalNoAccess: {
633634
title: 'Nicht so schnell',

src/languages/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ const translations = {
618618
getTheApp: 'Get the app',
619619
scanReceiptsOnTheGo: 'Scan receipts from your phone',
620620
headsUp: 'Heads up!',
621+
unstableInternetConnection: 'Unstable internet connection. Please check your network and try again.',
621622
},
622623
supportalNoAccess: {
623624
title: 'Not so fast',

src/languages/es.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ const translations = {
609609
getTheApp: 'Descarga la app',
610610
scanReceiptsOnTheGo: 'Escanea recibos desde tu teléfono',
611611
headsUp: '¡Atención!',
612+
unstableInternetConnection: 'Conexión a internet inestable. Por favor, revisa tu red e inténtalo de nuevo.',
612613
},
613614
supportalNoAccess: {
614615
title: 'No tan rápido',

src/languages/fr.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ const translations = {
628628
getTheApp: "Obtenez l'application",
629629
scanReceiptsOnTheGo: 'Numérisez les reçus depuis votre téléphone',
630630
headsUp: 'Attention !',
631+
unstableInternetConnection: 'Connexion Internet instable. Veuillez vérifier votre réseau et réessayer.',
631632
},
632633
supportalNoAccess: {
633634
title: 'Pas si vite',

src/languages/it.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ const translations = {
628628
getTheApp: "Scarica l'app",
629629
scanReceiptsOnTheGo: 'Scansiona le ricevute dal tuo telefono',
630630
headsUp: 'Attenzione!',
631+
unstableInternetConnection: 'Connessione Internet instabile. Controlla la tua rete e riprova.',
631632
},
632633
supportalNoAccess: {
633634
title: 'Non così in fretta',

src/languages/ja.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ const translations = {
628628
getTheApp: 'アプリを入手',
629629
scanReceiptsOnTheGo: '携帯電話から領収書をスキャンする',
630630
headsUp: 'ご注意ください!',
631+
unstableInternetConnection: 'インターネット接続が不安定です。ネットワークを確認してもう一度お試しください。',
631632
},
632633
supportalNoAccess: {
633634
title: 'ちょっと待ってください',

src/languages/nl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ const translations = {
627627
getTheApp: 'Download de app',
628628
scanReceiptsOnTheGo: 'Scan bonnetjes vanaf je telefoon',
629629
headsUp: 'Let op!',
630+
unstableInternetConnection: 'Onstabiele internetverbinding. Controleer je netwerk en probeer het opnieuw.',
630631
},
631632
supportalNoAccess: {
632633
title: 'Niet zo snel',

src/languages/pl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ const translations = {
628628
getTheApp: 'Pobierz aplikację',
629629
scanReceiptsOnTheGo: 'Skanuj paragony za pomocą telefonu',
630630
headsUp: 'Uwaga!',
631+
unstableInternetConnection: 'Niestabilne połączenie internetowe. Sprawdź swoją sieć i spróbuj ponownie.',
631632
},
632633
supportalNoAccess: {
633634
title: 'Nie tak szybko',

src/languages/pt-BR.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ const translations = {
627627
getTheApp: 'Obtenha o aplicativo',
628628
scanReceiptsOnTheGo: 'Digitalize recibos com seu celular',
629629
headsUp: 'Atenção!',
630+
unstableInternetConnection: 'Conexão de internet instável. Verifique sua rede e tente novamente.',
630631
},
631632
supportalNoAccess: {
632633
title: 'Não tão rápido',

0 commit comments

Comments
 (0)