Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant