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

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 claimed this task.