planka icon indicating copy to clipboard operation
planka copied to clipboard

Gracefully handle errors when failing to upload an attachment

Open TassSinclair opened this issue 10 months ago • 1 comments

Context

As raised in #302, it's possible for attachment uploads to fail for reasons outside of Planka's control. However, Planka currently logs these errors to the console and continues displaying a spinner, leading the casual observer to assume that the upload is still continuing.

It would be better for Planka to intercept errors that occur during the upload process, and inform the user.

Scenarios

Focusing on 413 errors; I haven't reviewed the code so I'm not sure which errors are already handled, or what the error scenarios look like

  • [ ] Attachment upload fails with 413 Request Entity Too Large GIVEN a Planka installation, served behind an NGINX reverse proxy AND the reverse proxy is using the default client max body size (1MB) WHEN the user uploads a 2MB attachment to a card AND a spinner shows on the card to represent the attachment upload AND the server responds with a 413 Request Entity Too Large THEN an error is shown to the user, alerting them of the failure (how? toast? A dialog?) AND the spinner is dismissed
  • [ ] Attachment upload failure message has link to documentation GIVEN a Planka installation, served behind an NGINX reverse proxy AND the reverse proxy is using the default client max body size (1MB) AND the user uploads a 2MB attachment to a card AND the server responds with a 413 Request Entity Too Large THEN the error shown includes a link to documentation (wiki? faq?) with suggestions of how to debug the issue.

TassSinclair avatar Apr 14 '24 09:04 TassSinclair

Hi! Thanks for reporting this. This really needs to be fixed, I think it will be in the v2 release (if no one wants to fix this sooner via PR).

meltyshev avatar Apr 15 '24 14:04 meltyshev