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

some requests to soundxyz's API fail, are we rate limited? #21

Open
TimDaub opened this issue Jun 28, 2022 · 3 comments
Open

some requests to soundxyz's API fail, are we rate limited? #21

TimDaub opened this issue Jun 28, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@TimDaub
Copy link
Collaborator

TimDaub commented Jun 28, 2022

(node:1887) UnhandledPromiseRejectionWarning: Error: FetchError: request to https://sound.xyz/api/metadata/38/1/14 failed, reason: connect ETIMEDOUT 104.26.1.213:443
    at Worker.<anonymous> (file:///home/runner/work/data/data/src/strategies/src/lifecycle.mjs:151:13)
    at Worker.emit (events.js:400:28)
    at MessagePort.<anonymous> (internal/worker.js:236:53)
    at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:399:24)
    at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26)
(node:1887) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 121)
(node:1887) UnhandledPromiseRejectionWarning: Error: Error: Request unsuccessful with status: 400
    at Worker.<anonymous> (file:///home/runner/work/data/data/src/strategies/src/lifecycle.mjs:151:13)
    at Worker.emit (events.js:400:28)
    at MessagePort.<anonymous> (internal/worker.js:236:53)
    at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:399:24)
    at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26)
@TimDaub TimDaub added the bug Something isn't working label Jun 28, 2022
@il3ven
Copy link
Collaborator

il3ven commented Jun 28, 2022

I am also getting the same error locally. Sometimes I also get a DNS error.

Error: soundxyz-get-tokenuri: FetchError: request to https://www.sound.xyz/api/metadata/55/1/18 failed, reason: getaddrinfo ENOTFOUND www.sound.xyz
    at Worker.<anonymous> (file:///Users/vaibhav/repos/il3ven/music-os/core/src/strategies/src/lifecycle.mjs:152:13)
    at Worker.emit (node:events:527:28)
    at MessagePort.<anonymous> (node:internal/worker:232:53)
    at MessagePort.[nodejs.internal.kHybridDispatch] (node:internal/event_target:643:20)
    at MessagePort.exports.emitMessage (node:internal/per_context/messageport:23:28)

As a solution we can implement retry functionality in extraction-worker.

@TimDaub
Copy link
Collaborator Author

TimDaub commented Jun 28, 2022

As a solution we can implement retry functionality in extraction-worker.

as long as we don't manage retry state ourselves (because that'd become mad complex), I'd be fine with that. We're using

"better-queue": "3.8.10",
, I'll transfer this issue over.

@TimDaub TimDaub transferred this issue from neume-network/strategies Jun 28, 2022
@il3ven
Copy link
Collaborator

il3ven commented Jul 3, 2022

We can use this for retry. https://github.com/diamondio/better-queue#retry

maxRetries: 3,
retryDelay: 1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants