From 228d64f00cb04b37c7aaa00dbeaaa14a4f4aca7b Mon Sep 17 00:00:00 2001 From: Alex Junior Date: Mon, 28 Mar 2022 19:52:20 -0300 Subject: [PATCH] [FIX] User status missing translate (#3960) Co-authored-by: Diego Mello --- app/views/StatusView.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/StatusView.tsx b/app/views/StatusView.tsx index 3aa232089..07d7138ca 100644 --- a/app/views/StatusView.tsx +++ b/app/views/StatusView.tsx @@ -166,7 +166,11 @@ class StatusView extends React.Component { dispatch(setUser({ status: item.id })); } } catch (e: any) { - showErrorAlert(I18n.t(e.data.errorType)); + const messageError = + e.data && e.data.error.includes('[error-too-many-requests]') + ? I18n.t('error-too-many-requests', { seconds: e.data.error.replace(/\D/g, '') }) + : e.data.errorType; + showErrorAlert(messageError); logEvent(events.SET_STATUS_FAIL); log(e); }