Last modified: 2014-05-19 11:31:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67268, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65268 - mw.api.getToken should not cache HTTP errors
mw.api.getToken should not cache HTTP errors
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.24rc
All All
: High normal (vote)
: 1.24.0 release
Assigned To: Fomafix
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-13 17:28 UTC by Fomafix
Modified: 2014-05-19 11:31 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Fomafix 2014-05-13 17:28:06 UTC
Temporary HTTP errors should not cached by mw.api.getToken.

Steps to reproduce
* Load MediaWiki
* Switch browser to offline mode
* Enter
var api = new mw.Api();
api.getToken( 'foo' )
.done( function ( data ) {
	console.log( 'done', data );
} )
.fail( function ( error ) {
	console.log( 'fail', error );
} );
>> fail http
* Switch browser to online mode
* Enter
api.getToken( 'foo' )
.done( function ( data ) {
	console.log( 'done', data );
} )
.fail( function ( error ) {
	console.log( 'fail', error );
} );
>> fail fail
expected result
>> fail token-missing
Comment 1 Gerrit Notification Bot 2014-05-13 18:44:39 UTC
Change 133106 had a related patch set uploaded by Gerrit Patch Uploader:
mediawiki.api: Do not cache errors in getToken()

https://gerrit.wikimedia.org/r/133106
Comment 2 Gerrit Notification Bot 2014-05-19 11:31:59 UTC
Change 133106 merged by jenkins-bot:
mediawiki.api: Do not cache errors in getToken()

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links