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

Spammed with "Bad gateway" when disconnected from server #132

Open
4oo4 opened this issue Apr 29, 2018 · 4 comments
Open

Spammed with "Bad gateway" when disconnected from server #132

4oo4 opened this issue Apr 29, 2018 · 4 comments

Comments

@4oo4
Copy link

4oo4 commented Apr 29, 2018

While messing with this, I noticed that if the server is stopped while you're browsing the page, that it will constantly outputs the "Bad gateway" error every few seconds. Is it possible to have it where it won't notify you again until you acknowledge it, and maybe have it not as frequent?

It's great to have that notification but annoying to have to click it 20+ times to get back to the page. For now I'm just refreshing as a workaround.

Cheers

@mably
Copy link
Owner

mably commented Apr 30, 2018

I haven't found a proper solution to handle this particular case of failing auto-refresh requests.
Do you have any suggestions to do?

@4oo4
Copy link
Author

4oo4 commented Apr 30, 2018

@mably I haven't had time to poke around the code to see where those notifications come from, if you point me in the right direction I can see if I can come up with anything. Otherwise, it's not a big deal since you can just refresh the page to dismiss them.

@mably
Copy link
Owner

mably commented Apr 30, 2018

Mostly from each dashboard element controller, like here: https://github.com/mably/lncli-web/blob/master/public/js/controllers/lnd/listpeers.js#L35
One solution could be to disable auto-refresh in case of similar repeating errors. Don't know how it could be cleanly implemented. May be we could skip showing identical errors unless a certain delay has elapsed.

@4oo4
Copy link
Author

4oo4 commented May 1, 2018

@mably That's what I was thinking, I was also looking into see if there was any way to get a variable based on whether someone interacted with the bootbox element. Perhaps it could look at xhrStatus: Complete from the API call?

I also feel like part of the problem is that each of those controllers is firing its own HTTP error alert (since they're all called from the page), so that causes them to multiply quickly. If one controller failed a connection, it follows that the rest would too. I'm not very experienced with node but I'll keep messing with it.

selection_001

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

No branches or pull requests

2 participants