PerformanC / NodeLink

Performant LavaLink alternative written with Node.Js
BSD 2-Clause "Simplified" License
38 stars 23 forks source link

[BUG]: Aggegrate error using soundcloud as source #65

Closed TehPigYT closed 2 months ago

TehPigYT commented 3 months ago

NodeLink version

GitHub commit: e871afa

Description

This is the error I get upon attempting to play soundcloud track

12|npm              | [http1makeRequest]: Failed sending HTTP request to https://a-v2.sndcdn.com/assets/0-b17d3b6c.js: AggregateError
12|npm              | [soundcloud]: Failed to fetch clientId.
12|npm              | file:///root/root/nodelink/src/sources/soundcloud.js:27
12|npm              |   const { body: data } = await http1makeRequest(assetId, {
12|npm              |                 ^
12|npm              | TypeError: Cannot destructure property 'body' of '(intermediate value)' as it is undefined.
12|npm              |     at Object.init (file:///root/root/nodelink/src/sources/soundcloud.js:27:17)
12|npm              |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
12|npm              |     at async file:///root/root/nodelink/src/connection/handler.js:817:7
12|npm              | Node.js v21.1.0

Client

FastLink (1b19ba6)

Steps to reproduce

Connect to NodeLink Search/play a track using scsearch The issue should appear in console

Example code

No response

Confirmations

Code of Conduct

ThePedroo commented 3 months ago

Supposedly created by a network issue, nothing much to be done about the fail itself, however I'll implement better error handling there to avoid crash and using the next release system to disable sources on runtime, to simply disable SoundCloud instead of taking the entire node down.

ThePedroo commented 2 months ago

https://github.com/PerformanC/NodeLink/commit/e998f7d1d265fe13b910dcc89f20f2395a1d51c5 should better handle those.