Page MenuHomePhabricator

Show a friendly message when creation of short URL fails
Closed, ResolvedPublic

Description

Reproduce:

  1. Do not log in
  2. View https://meta.wikimedia.org/wiki/Special:UrlShortener and input an URL to shorten
  3. Click "Shorten" 11 times

Expected:

Error message will be output to the "Shortened URL" box. It is already returned by API:

{"error":{"code":"urlshortener-ratelimit","info":"Please wait some time before shortening more URLs.","*":"See https://meta.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."}}

Actual:

The "Shortened URL" box shows "[object Object]"

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptJul 23 2019, 6:10 PM

Change 525231 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/UrlShortener@master] Show info in case of error, not the whole object

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

Change 525231 merged by jenkins-bot:
[mediawiki/extensions/UrlShortener@master] Show info in case of error, not the whole object

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

Ladsgroup closed this task as Resolved.Jul 28 2019, 4:58 PM
Ladsgroup claimed this task.
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptJul 28 2019, 4:58 PM