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 statusMessage: 'Too Many Requests' ? #60

Open
hems opened this issue Mar 4, 2020 · 4 comments
Open

Handle statusMessage: 'Too Many Requests' ? #60

hems opened this issue Mar 4, 2020 · 4 comments

Comments

@hems
Copy link

hems commented Mar 4, 2020

During my tests i run into this http response a few times:

statusCode: 429, statusMessage: 'Too Many Requests',

But the library only yields an error saying "DiscogsError: Unknown error."

Would it be possible to yield a more descriptive error in this case?

Also, I'm wondering if wouldn't be better to have some settings on the library to automatically "cool down" ( wait a 1 minute ) and retry the call again if a message like that happens?

Also: can't thank you enough for the work you have put into this library, thank you!

@bartve
Copy link
Owner

bartve commented Mar 17, 2020

Hmm then probably the structure of the Discogs error message has changed (see line 211 in client.js in the master branch). Could you perhaps tell me when the raw json message looks like now?

There is the queue function that sort of does the "cool down" thing, but with a limit.

Ugh, I haven't programmed JS in ages now and not much time available, so community feel free to participate.

@hems
Copy link
Author

hems commented Apr 21, 2020

Ugh, I haven't programmed JS in ages now and not much time available, so community feel free to participate.

no problems, thanks for sharing your work, I'll investigate this further!

@NemoN
Copy link

NemoN commented Oct 7, 2021

@hems Do you found a workaround for this issue?

@hems
Copy link
Author

hems commented Oct 8, 2021

@hems Do you found a workaround for this issue?

unfortunately i don't have a good fix for this, i just ended up doing a bit of rate limiting on my side and retrying on my side.

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

3 participants