xwp / unsplash-wp

GNU General Public License v2.0
9 stars 3 forks source link

Present a generic error to the user when plugin is unable to auto-import into site Media Library a #152

Closed bmattb closed 4 years ago

bmattb commented 4 years ago

Feature description

Occasionally media upload will fail, and we are unable to build out specific responses for each case with the limited time left. In cases such as this we should present a generic error to the user that recommends a retry.

I would expect that if an import action should fail that the plugin will present the following message to users via an in-browser notification. The notification should state:

"The file was unable to be imported into the Media Library. Please try again"

and present the user with the "Ok" button to acknowledge and clear the pop-up

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation brief

QA testing instructions

Demo

Changelog entry

csossi commented 4 years ago

@ravichdev - any details on how I can test this one? what conditions need to be present?

ravichdev commented 4 years ago

@csossi This is difficult to test, something has to cause an image import from Unsplash to fail, on my local I tested this with adding logic to the import code to exit early, but it's difficult for you to test this. @spacedmonkey Should we just move this to Done as you already reviewed the code and good with the solution ?

spacedmonkey commented 4 years ago

@csossi See Testing instructions.

csossi commented 4 years ago

Verified in QA

Error popup appearing: image

bmattb commented 4 years ago

@spacedmonkey - looks like the testing instructions didn't trigger the expected warning... thoughts?

bmattb commented 4 years ago

this has been flagged as "untestable" in current environments so I will pass and hope that it's working as expected.