Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle login timeouts #569

Open
robertvazan opened this issue Apr 9, 2021 · 0 comments
Open

Handle login timeouts #569

robertvazan opened this issue Apr 9, 2021 · 0 comments

Comments

@robertvazan
Copy link
Collaborator

When not editing for a while, the next edit via WikibaseDataEditor fails due to session timeout. See the exception below. WDTK never recovers. Recovery has to be implemented on application level. It would be better if WDTK detected this kind of error, flagged the connection as disconnected, and automatically retried logging in on next request. Even better, it could retry the request that failed because of this.

org.wikidata.wdtk.wikibaseapi.apierrors.AssertUserFailedException: [assertuserfailed] You are no longer logged in, so the action could not be completed.
	at org.wikidata.wdtk.wikibaseapi.apierrors.MediaWikiApiErrorHandler.throwMediaWikiApiErrorException(MediaWikiApiErrorHandler.java:64)
	at org.wikidata.wdtk.wikibaseapi.ApiConnection.checkErrors(ApiConnection.java:438)
	at org.wikidata.wdtk.wikibaseapi.ApiConnection.sendJsonRequest(ApiConnection.java:366)
	at org.wikidata.wdtk.wikibaseapi.WbEditingAction.performAPIAction(WbEditingAction.java:747)
	at org.wikidata.wdtk.wikibaseapi.WbEditingAction.wbEditEntity(WbEditingAction.java:308)
	at org.wikidata.wdtk.wikibaseapi.WikibaseDataEditor.editEntityDocument(WikibaseDataEditor.java:628)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant