Steps to replicate the issue (include links if applicable):
- visit a wiki
- press F12 to open browser devtools
- click console tab
- type mw.util.addPortletLink( 'p-i-do-not-exist-09740892798236732', 'https://www.test.com/', 'Test' );
- press enter
What happens?:
- nothing
What should have happened instead?:
- warning or error to console with a human readable error message such as "Error: attempting to addPortletLink to a non-existent portlet. Bad portletId."
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):