Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

[FIX] many-request-error #571

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

[FIX] many-request-error #571

wants to merge 1 commit into from

Conversation

Deepak-learner
Copy link
Contributor

[FIX] issue #351
when I reproduce the issue and check in inspect , network section , I get below result:
Screenshot 2021-03-24 at 3 06 25 AM

So , I fix this issue by showing this error to user , and ask him to wait as page will reload after given time in error message . For more clarity check this out:

Screen.Recording.2021-03-24.at.3.01.05.AM.mov

@Deepak-learner
Copy link
Contributor Author

Deepak-learner commented Mar 23, 2021

@renatobecker, @rafaelblink , @murtaza98 please review.

window.loadMessagesTimeout = setInterval(() => {
let tmpWaitTime = store.state.loadWaitTime;
if(tmpWaitTime) {
store.setState({loadWaitTime: tmpWaitTime - 1, loadingMessage: `Error, too many requests. Please slow down. You must wait for ${tmpWaitTime} seconds.` });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set this message on i18n files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to your comment, does I need to set that message in all i18n files. Like I have to translate that message to all other languages and set it to respective i18n json files. Right? And if this is the case how I can identify which i18n json file belong to which language. Is there any fast way to do this or I have to manually check each i18n json file to check which language it belongs to. Looking forward to your response. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check the i18n command on package.json files.

You'll use with I18n.t('YOUR TEXT') and run the command, that command will create the line on i18n files.

}
}
catch(e) {
const waitTime = parseInt(e.data.error.match(/^.*You must wait ([0-9]*) seconds.*$/)[1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set this message on i18n files.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants