Make SnackBar 5XX message more descriptive
Tmpod opened this issue · 3 comments
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.
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?
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.