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

show message when API is down #25

Open
mircealungu opened this issue Oct 18, 2022 · 5 comments
Open

show message when API is down #25

mircealungu opened this issue Oct 18, 2022 · 5 comments

Comments

@mircealungu
Copy link
Member

When API is down (which should not happen but unfortunately sometimes still does) the popup should show a corresponding message; something like "could not connect to the server".

@Emmategl
Copy link
Member

True. So, on http://zeeguu.org/ we only display such a message if they try to login. So, that error message belongs to “Zeeguu_API.prototype.signIn”, which catches “There seems to be a problem with the server. Please try again later”. We also have this implemented in “Login.js” as errorMessage. But, as I recall, if the server is down, the extension is just empty. So, we have a problem before they click “login”.

Inside of popup.js we create the API “let api = new Zeeguu_API("https://api.zeeguu.org/”)”. But do we need to catch an error at this time? Looking at the code I does not look like we use the api, if the user is not logged in. And I guess, if the API is down, then the user is not logged in. But the extension does not work at all, if the API is down. So, we must use it for something, as soon as we click it. Hmm.

Is there a way to test this without the API being down?

@mircealungu
Copy link
Member Author

But, as I recall, if the server is down, the extension is just empty. So, we have a problem before they click “login”.

The problem is also when I'm logged in and I try to open the popup... the extension tries to figure out whether the article is readable, and it gets stuck there I think.

However, maybe we can consider this low priority given that:

  1. the API should just not be down...
  2. If we're considering trying out the div at the top of the page with "cleanup and read with zeeguu" then this particular situation won't happen?

@mircealungu
Copy link
Member Author

regarding testing w/o the API being down; locally you can change the API url to something that does not exist and the situation should be the same... or?

@Emmategl
Copy link
Member

Sure, we can make it low priority. Though, even if we add the div at the top of the page with "cleanup", maybe we still have login in the popup? And maybe some settings. And maybe in the future something in regard to difficulty. So, my guess is, that we would still need to talk to the api in the popup.

@mircealungu
Copy link
Member Author

It's a very good point. we'll definitely have to solve the same problem with the API communication.

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