GNOME Bugzilla – Bug 756855
Handle errors when using paste service
Last modified: 2021-06-10 11:05:13 UTC
The upload to the paste service can fail, either because the service itself is down/overloaded (hopefully rare), or because the called method returns one of the errors indicated in the API[0]. At least err_data_too_big is something we cannot address on our side, so we should find a way to report the error to the user. [0] http://sayakb.github.io/sticky-notes/pages/api/
Created attachment 314414 [details] Polari Paste Service Error Handling Wire (rev1) Here's a proposal. (It assumes we wish to continue using in-app notifications for uploading to a paste service).
(In reply to Bastian Ilsø from comment #1) > Created attachment 314414 [details] > Polari Paste Service Error Handling Wire (rev1) > > Here's a proposal. (It assumes we wish to continue using in-app > notifications for uploading to a paste service). Perhaps style it with error style, just the way we started doing with wrong IRC commands.
(In reply to Kunaal Jain from comment #2) > Perhaps style it with error style, just the way we started doing with wrong > IRC commands. Do you mean to the chat entry? When we get this error, the entry has already been cleared so I don't think that behavior can be applied in this situation. If you mean to the notification itself, well I think having the dialog-error icon is a sufficient indicator for this case. Also, AFAIK, the error style is intended only to input fields.
(In reply to Bastian Ilsø from comment #3) > (In reply to Kunaal Jain from comment #2) > > Perhaps style it with error style, just the way we started doing with wrong > > IRC commands. > > Do you mean to the chat entry? When we get this error, the entry has already > been cleared so I don't think that behavior can be applied in this situation. > > If you mean to the notification itself, well I think having the dialog-error > icon is a sufficient indicator for this case. Also, AFAIK, the error style > is intended only to input fields. I meant notification itself. We are doing this in case of wrong IRC commands, highlight the error message with error class. But that's a small thing to include error class or not. I'll write a patch for this as soon as I get some time. Caught up in college exams these days :(
Created attachment 316584 [details] [review] Handle errors when using paste service
Created attachment 316585 [details] [review] Handle errors when using paste service fixed some nitpicks
Review of attachment 316585 [details] [review]: ::: src/pasteManager.js @@ +323,3 @@ }); + +const ErrorNotification = new Lang.Class({ Instead of making a new notification, it might make more sense to use a GtkStack in the existing Upload notification class and cross-fade over to the error if we encounter one. What do you think?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Polari, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/polari/-/issues/ Thank you for your understanding and your help.