Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Status code: 410')
at new NodeError (node:internal/errors:393:5)
at Player.emit (node:events:502:17)
at StreamConnection. (D:\Projetos\Projetos VSCode\discord\discord-bot\node_modules\discord-music-player\dist\managers\Queue.js:184:
47)
at StreamConnection.emit (node:events:513:28)
at AudioPlayer. (D:\Projetos\Projetos VSCode\discord\discord-bot\node_modules\discord-music-player\dist\voice\StreamConnection.js:9
1:18)
at AudioPlayer.emit (node:events:513:28)
at Encoder.onStreamError (D:\Projetos\Projetos VSCode\discord\discord-bot\node_modules\@discordjs\voice\dist\index.js:954:14)
at Object.onceWrapper (node:events:628:26)
at Encoder.emit (node:events:525:35)
at emitErrorNT (node:internal/streams/destroy:151:8) {
code: 'ERR_UNHANDLED_ERROR',
context: 'Status code: 410'
}`
When searching for the music, everything happens normally, it even finds all the information regarding it, but when it actually plays, the error occurs, knocking down the application. I would just like to find some way to handle the error without crashing the application.
Performing some tests I noticed that when trying to play an age-restricted music from Youtube the following error occurs:
`node:events:504 throw err; // Unhandled 'error' event ^
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Status code: 410') at new NodeError (node:internal/errors:393:5) at Player.emit (node:events:502:17) at StreamConnection. (D:\Projetos\Projetos VSCode\discord\discord-bot\node_modules\discord-music-player\dist\managers\Queue.js:184:
47)
at StreamConnection.emit (node:events:513:28)
at AudioPlayer. (D:\Projetos\Projetos VSCode\discord\discord-bot\node_modules\discord-music-player\dist\voice\StreamConnection.js:9
1:18)
at AudioPlayer.emit (node:events:513:28)
at Encoder.onStreamError (D:\Projetos\Projetos VSCode\discord\discord-bot\node_modules\@discordjs\voice\dist\index.js:954:14)
at Object.onceWrapper (node:events:628:26)
at Encoder.emit (node:events:525:35)
at emitErrorNT (node:internal/streams/destroy:151:8) {
code: 'ERR_UNHANDLED_ERROR',
context: 'Status code: 410'
}`
When searching for the music, everything happens normally, it even finds all the information regarding it, but when it actually plays, the error occurs, knocking down the application. I would just like to find some way to handle the error without crashing the application.
Versioning: