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

Better UI : display axios errors nicely #70

Open
benoit74 opened this issue Oct 19, 2023 · 4 comments
Open

Better UI : display axios errors nicely #70

benoit74 opened this issue Oct 19, 2023 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@benoit74
Copy link
Collaborator

With the new UI, axios errors are handled but not displayed.

We should :

  • display the "nice" error to the user
  • be able to open a debug UI where we could see all errors (navigator console?)
@benoit74 benoit74 added the enhancement New feature or request label Oct 19, 2023
@benoit74 benoit74 added this to the 1.2.0 milestone Oct 20, 2023
@benoit74 benoit74 mentioned this issue Oct 22, 2023
@benoit74 benoit74 changed the title Better UI : display handling axios errors nicely Better UI : display axios errors nicely Nov 2, 2023
@benoit74 benoit74 modified the milestones: 1.2.0, 1.3.0 Feb 14, 2024
@benoit74 benoit74 modified the milestones: 1.3.0, 2.0.0 Mar 27, 2024
@Sudarshan-21
Copy link
Contributor

@benoit74 can you provide me with some testases for the errors we are expecting, OR can you provide me with the steps to produce these errors in the code for testing purpose.

@benoit74
Copy link
Collaborator Author

Could be any kind of error, so we have to be ready for it. These errors are for now logged with console.log statements, but we need to display them nicely in the UI.
Most probably situation is a 404 error because of a bad request, typically a request to a topic which does not exists in the ZIM. Simple to produce by loading a topic which does not exists inside the ZIM.
But code should "cope" with all other errors as well, so it should probably quite generic. It is not expected to happen at all, but it could. I suggest to display something like "An error happened, cannot load requested content" with a "More details" button to display more details : HTTP return code and reply body if any ; or javascript error.

@Sudarshan-21
Copy link
Contributor

Sudarshan-21 commented Mar 28, 2024

@benoit74 I don't exactly seem to find any console.logs in the new_ui branch for any axios errors. but I encountered the axios errors taking care of errors concerned with fetchchannel() and fetchtopic() and I took care of those two errors (screenshot attached).
But as you said in the comment that the axios errors are getting logged into console, I do not seem to find those anywhere (have a look at the sidebar in the following screenshot)

Screenshot from 2024-03-28 14-36-25

@benoit74
Copy link
Collaborator Author

You are right, we probably decided to stop logging these errors, anyway, you found "the place".

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

No branches or pull requests

2 participants