Page MenuHomePhabricator

Handle errors on (un)subscription in Special:Newsletters
Closed, ResolvedPublic

Description

https://gerrit.wikimedia.org/r/246675 implemented a JS subscription functionality which will show a success message if the API request was successful. It currently doesn't handle errors - but it should show error messages if the API request was unsuccessful. The API was rewritten in https://gerrit.wikimedia.org/r/#/c/244184/ to die on errors so we only need to make the javascript handle it.

Event Timeline

Glaisher raised the priority of this task from to Needs Triage.
Glaisher updated the task description. (Show Details)
Glaisher subscribed.
Qgil triaged this task as Low priority.Oct 22 2015, 10:47 AM
Qgil moved this task from Backlog to Technical review on the MediaWiki-extensions-Newsletter board.
Qgil subscribed.

Yes. This should be pretty easy. https://phabricator.wikimedia.org/diffusion/ENLT/browse/master/modules/ext.newsletter.js. doAPIRequest() returns a Promise object so we just need to add .fail() handling code here.

Change 259655 had a related patch set uploaded (by PranavK):
Handle errors when attempting to unsubscribe on Special:Newsletters

https://gerrit.wikimedia.org/r/259655

Change 259655 merged by jenkins-bot:
Handle errors when attempting to subscribe/unsubscribe on Special:Newsletters

https://gerrit.wikimedia.org/r/259655