anpigon / obsidian-book-search-plugin

Obsidian plugin that automatically creates notes by searching for books

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error : Request failed, status 429

PCHooper opened this issue · comments

Hello,
i have this error but i can't fix it;
I already tried to reinstall the plugin but the error is still here.

Status 429 states that there's too many requests being sent to the server. Just wait for about a day and it should work again.

I get the same, just installed the the plugin. Tried the usual poking around, wondered if it was something to do with the API key and whether I needed a personal one. Started to look at the code in the plug in folder and quickly got out my depth.
Looks a really neat utility. Hopefully will work later.

Started working a couple of hours later, just needed to go for a run and a cup of tea. Patience 🤪

commented

I want to add to it so the error popup actually says what it is about, like:
Status 429: Too Many Requests to the API, wait a few minutes
or something around those lines if that's possible -.- it's something that happened to me too when just installed the plugin

I have the same problem. I will try again in a a few hours.

✋🏽 Same problem here!

Have the same error, cant say for sure ofc but it feels ike it never not happens?

Happens to me all the time… occurred never before so it definitely feels like a recent problem / a problem which has gotten worse recently due to some API change? Should be investigated as it renders the plugin useless.

My solution which has been working so far was to create a Google Books API key, giving it Books API access (which didn't show up initially for some reason. You may need to enable it here, but it also works with unrestricted access), then in the minified main.js plugin file I changed:
t.langRestrict=o;let n=yield He("https://www.googleapis.com
to be (with your key in place of xxxyyyzzz):
t.langRestrict=o;t.key="xxxyyyzzz";let n=yield He("https://www.googleapis.com

This way you're not competing with the public rate limits and instead have your own limit of 1000 queries a day.

Thank you! Very good suggestion, will try later. Has worked, many thanks!

@vityav Thanks! At first when I tried the change it didn't work it actually gave me a 404. When I reverted the text back to what the ending part is originally in my main.js file with the key that was generated it worked. So thanks again for helping to find a solution so far. 😄

so would it be possible to get a setting to add your own API key instead of having to hack a file to make it happen. Currently if you upgrade the plugin you'll have to "hack" the file again with your API key.

Adding my own unrestricted key to main.js just resulted in 403. I could never get that to work for some reason.

Adding my own unrestricted key to main.js just resulted in 403. I could never get that to work for some reason.

I'd double check that you don't have any restrictions set on the key. I accidentally added a website restriction on mine (because it got tied to my Maps API somehow) and it started giving 403 errors until I removed the restriction.