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

Make SnackBar 5XX message more descriptive #1532

Open
3 tasks done
Tmpod opened this issue May 31, 2024 · 3 comments
Open
3 tasks done

Make SnackBar 5XX message more descriptive #1532

Tmpod opened this issue May 31, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Tmpod
Copy link

Tmpod commented May 31, 2024

Pre-Flight checklist

  • Did you check to see if this issue already exists?
  • This is a single feature request. (Do not put multiple feature requests in one issue)
  • This is not a question or discussion. (Use https://lemmy.ml/c/jerboa for that)

Describe The Feature Request Below

The app should display the HTTP content returned by the server in case of an error. For example, the app currently displays a toast for 5xx codes, but it doesn't show the message, which makes it impossible to show Jerboa users there's a maintenance happening (503). The Thunder app does show it.

@Tmpod Tmpod added the enhancement New feature or request label May 31, 2024
@MV-GH
Copy link
Collaborator

MV-GH commented May 31, 2024

Jerboa doesn't show full message in the Toast because Toast message their max length is arbitrary defined. It varies between Android version, OEM model, screen resolution, screen size, ... There is no well defined maximum message size. So we aim to be as brief as possible.

Instead what we can do if it fails to load the feed is show the full error message in the feed. Another solution that is being worked on: The log Viewer which will also have full the message. Something else we can also do, use an heuristic to detect that an instance is in maintenance and display that in the Snackbar. Currently I believe the snackbar will just simply say, "Instance is experiencing internal issues"?

@dessalines Does instance always return 503 and only for maintenance or does this vary between instance?

@Tmpod
Copy link
Author

Tmpod commented May 31, 2024 via email

@MV-GH MV-GH changed the title Display HTTP error message in toast Make SnackBar 5XX message more descriptive May 31, 2024
@dessalines
Copy link
Member

dessalines commented Jun 1, 2024

503 is defined as temporary status for when the server is overloaded or
under maintenece, so having a special handler for it sounds good to me.

As far as I know, it's up to the instance admins to configure that in
their web server (nginx, apache, caddy, etc).

That's correct, the only time I can see that we use a 503 in the backend, is during server startup, which shouldn't take more than a few seconds unless there's been an upgrade.

Having these errors in the log viewer is the only real solution IMO.

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

3 participants