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

xpub-scan is crashing with high number of address gaps #146

Open
vasuxdev opened this issue Nov 26, 2022 · 1 comment
Open

xpub-scan is crashing with high number of address gaps #146

vasuxdev opened this issue Nov 26, 2022 · 1 comment

Comments

@vasuxdev
Copy link

It seems some API call restrictions or it can't handle the back to back api calls?

probing address gap...node:internal/process/promises:289

        triggerUncaughtException(err, true /* fromPromise */);
        ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "AxiosError: Request failed with status code 429".] {
code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v19.1.0

The workaround would be to await the response, something like this

try {
const result = await axios.post(YOUR_URL, {});
} catch (error) {
console.error(error);
}

@vasuxdev
Copy link
Author

vasuxdev commented Dec 3, 2022

Just adding sleep 1 sec after every 50 calls should fix the issue ?

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