Skip to content

Commit

Permalink
Merge pull request #8019 from Santhosh-Sellavel/santhosh-IOU_Phone_Error
Browse files Browse the repository at this point in the history
IOU Invalid Phone number error handled
  • Loading branch information
iwiznia authored Mar 18, 2022
2 parents c87891b + c157acc commit 75e6dbd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default {
error: {
invalidAmount: 'Invalid amount',
acceptedTerms: 'You must accept the Terms of Service to continue',
phoneNumber: 'Please enter a valid phone number, with the country code (e.g. +1234567890)',
},
please: 'Please',
contactUs: 'contact us',
Expand Down
3 changes: 2 additions & 1 deletion src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default {
error: {
invalidAmount: 'Monto no válido',
acceptedTerms: 'Debes aceptar los Términos de servicio para continuar',
phoneNumber: 'Ingresa un teléfono válido, incluyendo el código de país (p. ej. +1234567890)',
},
please: 'Por favor',
contactUs: 'contáctenos',
Expand Down Expand Up @@ -827,7 +828,7 @@ export default {
invite: {
invitePeople: 'Invitar nuevos miembros',
personalMessagePrompt: 'Agregar un mensaje personal (Opcional)',
pleaseSelectUser: 'Asegúrese de que el correo electrónico o el número de teléfono sean válidos (e.g. +15005550006).',
pleaseSelectUser: 'Asegúrese de que el correo electrónico o el número de teléfono sean válidos (p. ej. +15005550006).',
genericFailureMessage: 'Se produjo un error al invitar al usuario al espacio de trabajo. Vuelva a intentarlo..',
welcomeNote: ({workspaceName}) => `¡Has sido invitado a ${workspaceName}! Descargue la aplicación móvil Expensify en use.expensify.com/download para comenzar a rastrear sus gastos.`,
},
Expand Down
4 changes: 2 additions & 2 deletions src/libs/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ Network.registerResponseHandler((queuedRequest, response) => {
return;
}

if (response.jsonCode === 405 || response.jsonCode === 404) {
// IOU Split & Request money transactions failed due to invalid amount(405) or unable to split(404)
if (response.jsonCode === 405 || response.jsonCode === 404 || response.jsonCode === 402) {
// IOU Split & Request money transactions failed, due to invalid amount(405), unable to split(404), invalid phone number(402)
// It's a failure, so reject the queued request
queuedRequest.reject(response);
return;
Expand Down
2 changes: 2 additions & 0 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ function getIOUErrorMessage(error) {
return Localize.translateLocal('common.error.invalidAmount');
} if (error.jsonCode === 404) {
return Localize.translateLocal('iou.error.invalidSplit');
} if (error.jsonCode === 402) {
return Localize.translateLocal('common.error.phoneNumber');
}
}
return Localize.translateLocal('iou.error.other');
Expand Down

0 comments on commit 75e6dbd

Please sign in to comment.