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

429 handling for login #86

Open
addshore opened this issue Feb 13, 2025 · 0 comments
Open

429 handling for login #86

addshore opened this issue Feb 13, 2025 · 0 comments

Comments

@addshore
Copy link
Contributor

undefined:1
<html>
^

SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5419:19)
    at successSteps (node:internal/deps/undici/undici:5390:27)
    at fullyReadBody (node:internal/deps/undici/undici:1501:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async specConsumeBody (node:internal/deps/undici/undici:5399:7)
    at async parseLoginCookies (file:///home/adam/dev/github/addshore/wikibase.world/node_modules/wikibase-edit/lib/request/login.js:66:16)
    at async login (file:///home/adam/dev/github/addshore/wikibase.world/node_modules/wikibase-edit/lib/request/login.js:21:24)
    at async file:///home/adam/dev/github/addshore/wikibase.world/node_modules/wikibase-edit/lib/request/get_token.js:11:28
    at async tryActionPost (file:///home/adam/dev/github/addshore/wikibase.world/node_modules/wikibase-edit/lib/request/post.js:15:24)

Node.js v21.6.0

Ideally, behaviour for login would be more similar to edits, which get retried?

[wikibase-edit][WARNING] GET https://wikibase.world/w/api.php?action=wbgetentities&ids=P57&format=json&props=info
    Could not parse response: <html>
<head><title>429 Too Many Requests</title></head>
<body>
<center><h1>429 Too Many Requests</h1></center>
<hr><center>nginx</center>
</body>
</html>

    retrying in 5s (attempt: 1, maxlag: undefined)

This is probably reproducable by trying to make a bunch of requests to wikibase cloud wikibases right now, due to rate limiting imposed by https://phabricator.wikimedia.org/T385969

Running version 7.2.0

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