Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce unnecessary log outs #1386

Merged

Conversation

jsladerman
Copy link
Contributor

this was likely causing unnecessary logouts, and we don't necessarily need a logout when LoginError is rendered

@jsladerman jsladerman added bug-fix This pull request fixes a bug frontend Changes related to the frontend labels Sep 16, 2024
@jsladerman jsladerman requested a review from a team September 16, 2024 20:32
Copy link

linear bot commented Sep 16, 2024

Copy link
Member

@michaeljguarino michaeljguarino left a comment

Choose a reason for hiding this comment

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

if you're trying to fix this:

if (error || (!loading && !data?.clusterInfo)) {
return <LoginError error={error} />
}

Then maybe the better approach is to just trigger the timeout effect if the error is not a network error

@jsladerman jsladerman force-pushed the jake/prod-2539-frequent-logouts-on-mottmac-console-instance branch from 79e3395 to 5e57fe3 Compare September 16, 2024 21:15
@jsladerman
Copy link
Contributor Author

if you're trying to fix this:

if (error || (!loading && !data?.clusterInfo)) {
return <LoginError error={error} />
}

Then maybe the better approach is to just trigger the timeout effect if the error is not a network error

good point, I updated it to check for the error I was getting when simulating it. seemed to work correctly when testing. figured checking for any network error might be too big of an umbrella

@jsladerman jsladerman force-pushed the jake/prod-2539-frequent-logouts-on-mottmac-console-instance branch 3 times, most recently from 1569ec1 to 22376af Compare September 17, 2024 16:17
@jsladerman jsladerman force-pushed the jake/prod-2539-frequent-logouts-on-mottmac-console-instance branch from 22376af to 849adf7 Compare September 17, 2024 16:24
@jsladerman jsladerman force-pushed the jake/prod-2539-frequent-logouts-on-mottmac-console-instance branch from 849adf7 to f227e59 Compare September 17, 2024 17:03
@jsladerman jsladerman merged commit 67729b1 into master Sep 17, 2024
10 checks passed
@jsladerman jsladerman deleted the jake/prod-2539-frequent-logouts-on-mottmac-console-instance branch September 17, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix This pull request fixes a bug frontend Changes related to the frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants